aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@theqtcompany.com>2015-07-14 15:32:33 +0200
committerUlf Hermann <ulf.hermann@theqtcompany.com>2015-08-04 13:34:29 +0000
commite115fca4af33bee94c5d524e5d7776b1fa6a31a7 (patch)
tree016fb9d57e1137957272db71f978e201440c7318
parent2c0ed9491e55bdc96bc2deb5ec3c40df6e3271f6 (diff)
Retrieve services from debug connector, not via static instance()
This will allow us to remove the instance() methods and create the services from factories in plugins. Also, it allows us to remove the isDebugging member from QQmlEnginePrivate. Change-Id: Id9d9820a910902ecfdb1e8175e215093ce3d0965 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
-rw-r--r--src/plugins/qmltooling/qmldbg_qtquick2/qquickviewinspector.cpp1
-rw-r--r--src/plugins/qmltooling/shared/abstractviewinspector.cpp4
-rw-r--r--src/qml/debugger/qdebugmessageservice.cpp7
-rw-r--r--src/qml/debugger/qdebugmessageservice_p.h4
-rw-r--r--src/qml/debugger/qqmldebugconnector_p.h7
-rw-r--r--src/qml/debugger/qqmldebugserviceinterfaces_p.h8
-rw-r--r--src/qml/qml/qqmlboundsignal.cpp9
-rw-r--r--src/qml/qml/qqmlcomponent.cpp8
-rw-r--r--src/qml/qml/qqmlengine.cpp8
-rw-r--r--src/qml/qml/qqmlengine_p.h1
-rw-r--r--src/qml/qml/v8/qqmlbuiltinfunctions.cpp12
-rw-r--r--src/quick/items/qquickrendercontrol.cpp1
-rw-r--r--src/quick/items/qquickview.cpp12
-rw-r--r--src/quick/items/qquickwindow.cpp1
-rw-r--r--src/quick/qtquick2.cpp14
-rw-r--r--src/quick/scenegraph/qsgcontext.cpp2
-rw-r--r--src/quick/scenegraph/qsgthreadedrenderloop.cpp4
-rw-r--r--src/quick/util/qquickprofiler.cpp8
-rw-r--r--src/quick/util/qquickprofiler_p.h2
-rw-r--r--src/quickwidgets/qquickwidget.cpp12
20 files changed, 76 insertions, 49 deletions
diff --git a/src/plugins/qmltooling/qmldbg_qtquick2/qquickviewinspector.cpp b/src/plugins/qmltooling/qmldbg_qtquick2/qquickviewinspector.cpp
index 1506b04863..003349ef55 100644
--- a/src/plugins/qmltooling/qmldbg_qtquick2/qquickviewinspector.cpp
+++ b/src/plugins/qmltooling/qmldbg_qtquick2/qquickviewinspector.cpp
@@ -37,7 +37,6 @@
#include "inspecttool.h"
#include <QtQml/private/qqmlengine_p.h>
-#include <QtQml/private/qqmldebugservice_p.h>
#include <QtQuick/private/qquickitem_p.h>
#include <QtQuick/QQuickView>
diff --git a/src/plugins/qmltooling/shared/abstractviewinspector.cpp b/src/plugins/qmltooling/shared/abstractviewinspector.cpp
index 6184b4c987..e1b55c8449 100644
--- a/src/plugins/qmltooling/shared/abstractviewinspector.cpp
+++ b/src/plugins/qmltooling/shared/abstractviewinspector.cpp
@@ -32,7 +32,6 @@
****************************************************************************/
#include "abstractviewinspector.h"
-
#include "abstracttool.h"
#include <QtCore/QDebug>
@@ -40,6 +39,7 @@
#include <QtQml/QQmlComponent>
#include <QtCore/private/qabstractanimation_p.h>
#include <QtQml/private/qqmlinspectorservice_p.h>
+#include <QtQml/private/qqmldebugconnector_p.h>
#include <QtQml/private/qqmlcontext_p.h>
#include <QtGui/QMouseEvent>
@@ -83,7 +83,7 @@ namespace QmlJSDebugger {
AbstractViewInspector::AbstractViewInspector(QObject *parent) :
QObject(parent),
m_enabled(false),
- m_debugService(QQmlInspectorServiceImpl::instance()),
+ m_debugService(QQmlDebugConnector::service<QQmlInspectorServiceImpl>()),
m_eventId(0),
m_reloadEventId(-1)
{
diff --git a/src/qml/debugger/qdebugmessageservice.cpp b/src/qml/debugger/qdebugmessageservice.cpp
index 3e5cec54b1..6b0f184951 100644
--- a/src/qml/debugger/qdebugmessageservice.cpp
+++ b/src/qml/debugger/qdebugmessageservice.cpp
@@ -32,6 +32,7 @@
****************************************************************************/
#include "qdebugmessageservice_p.h"
+#include <private/qqmldebugconnector_p.h>
#include <QDataStream>
@@ -39,14 +40,16 @@ QT_BEGIN_NAMESPACE
Q_GLOBAL_STATIC(QDebugMessageService, qmlDebugMessageService)
+const QString QDebugMessageService::s_key = QStringLiteral("DebugMessages");
+
void DebugMessageHandler(QtMsgType type, const QMessageLogContext &ctxt,
const QString &buf)
{
- QDebugMessageService::instance()->sendDebugMessage(type, ctxt, buf);
+ QQmlDebugConnector::service<QDebugMessageService>()->sendDebugMessage(type, ctxt, buf);
}
QDebugMessageService::QDebugMessageService(QObject *parent) :
- QQmlDebugService(QStringLiteral("DebugMessages"), 2, parent), oldMsgHandler(0),
+ QQmlDebugService(s_key, 2, parent), oldMsgHandler(0),
prevState(QQmlDebugService::NotConnected)
{
// don't execute stateChanged() in parallel
diff --git a/src/qml/debugger/qdebugmessageservice_p.h b/src/qml/debugger/qdebugmessageservice_p.h
index 55e92d437f..3d0d8a79a5 100644
--- a/src/qml/debugger/qdebugmessageservice_p.h
+++ b/src/qml/debugger/qdebugmessageservice_p.h
@@ -66,9 +66,13 @@ public:
const QString &buf);
protected:
+ static const QString s_key;
+
void stateChanged(State);
private:
+ friend class QQmlDebugConnector;
+
QtMessageHandler oldMsgHandler;
QQmlDebugService::State prevState;
QMutex initMutex;
diff --git a/src/qml/debugger/qqmldebugconnector_p.h b/src/qml/debugger/qqmldebugconnector_p.h
index 30283eae67..91f898bd4b 100644
--- a/src/qml/debugger/qqmldebugconnector_p.h
+++ b/src/qml/debugger/qqmldebugconnector_p.h
@@ -71,6 +71,13 @@ public:
virtual bool removeService(QQmlDebugService *service) = 0;
virtual bool open(const QVariantHash &configuration = QVariantHash()) = 0;
+
+ template<class Service>
+ static Service *service()
+ {
+ QQmlDebugConnector *inst = instance();
+ return inst ? static_cast<Service *>(inst->service(Service::s_key)) : 0;
+ }
};
QT_END_NAMESPACE
diff --git a/src/qml/debugger/qqmldebugserviceinterfaces_p.h b/src/qml/debugger/qqmldebugserviceinterfaces_p.h
index 3c204bca8a..a2ba670608 100644
--- a/src/qml/debugger/qqmldebugserviceinterfaces_p.h
+++ b/src/qml/debugger/qqmldebugserviceinterfaces_p.h
@@ -63,6 +63,8 @@ public:
virtual void signalEmitted(const QString &signal) = 0;
protected:
+ friend class QQmlDebugConnector;
+
QV4DebugService(float version, QObject *parent = 0) :
QQmlDebugService(s_key, version, parent) {}
@@ -83,6 +85,8 @@ public:
virtual void dataReady(QQmlAbstractProfilerAdapter *profiler) = 0;
protected:
+ friend class QQmlDebugConnector;
+
QQmlProfilerService(float version, QObject *parent = 0) :
QQmlDebugService(s_key, version, parent) {}
@@ -97,6 +101,8 @@ public:
virtual void setStatesDelegate(QQmlDebugStatesDelegate *) = 0;
protected:
+ friend class QQmlDebugConnector;
+
QQmlEngineDebugService(float version, QObject *parent = 0) :
QQmlDebugService(s_key, version, parent) {}
@@ -113,6 +119,8 @@ public:
virtual void removeView(QObject *) = 0;
protected:
+ friend class QQmlDebugConnector;
+
QQmlInspectorService(float version, QObject *parent = 0) :
QQmlDebugService(s_key, version, parent) {}
diff --git a/src/qml/qml/qqmlboundsignal.cpp b/src/qml/qml/qqmlboundsignal.cpp
index 9577e107ab..3d1a9f8a88 100644
--- a/src/qml/qml/qqmlboundsignal.cpp
+++ b/src/qml/qml/qqmlboundsignal.cpp
@@ -43,8 +43,8 @@
#include "qqmlcontext.h"
#include "qqmlglobal_p.h"
#include <private/qqmlprofiler_p.h>
-#include <private/qv4debugservice_p.h>
#include <private/qqmldebugconnector_p.h>
+#include <private/qqmldebugserviceinterfaces_p.h>
#include <private/qqmlcompiler_p.h>
#include "qqmlinfo.h"
@@ -320,8 +320,11 @@ void QQmlBoundSignal_callback(QQmlNotifierEndpoint *e, void **a)
if (!s->m_expression)
return;
- if (QQmlDebugConnector::instance())
- QV4DebugServiceImpl::instance()->signalEmitted(QString::fromLatin1(QMetaObjectPrivate::signal(s->m_expression->target()->metaObject(), s->signalIndex()).methodSignature()));
+ QV4DebugService *service = QQmlDebugConnector::service<QV4DebugService>();
+ if (service)
+ service->signalEmitted(QString::fromLatin1(QMetaObjectPrivate::signal(
+ s->m_expression->target()->metaObject(),
+ s->signalIndex()).methodSignature()));
QQmlEngine *engine;
if (s->m_expression && (engine = s->m_expression->engine())) {
diff --git a/src/qml/qml/qqmlcomponent.cpp b/src/qml/qml/qqmlcomponent.cpp
index efa4270aa5..c511c81166 100644
--- a/src/qml/qml/qqmlcomponent.cpp
+++ b/src/qml/qml/qqmlcomponent.cpp
@@ -43,7 +43,8 @@
#include "qqmlengine.h"
#include "qqmlbinding_p.h"
#include "qqmlglobal_p.h"
-#include <private/qqmlenginedebugservice_p.h>
+#include <private/qqmldebugconnector_p.h>
+#include <private/qqmldebugserviceinterfaces_p.h>
#include "qqmlincubator.h"
#include "qqmlincubator_p.h"
#include <private/qqmljavascriptexpression_p.h>
@@ -895,10 +896,11 @@ QQmlComponentPrivate::beginCreate(QQmlContextData *context)
depthIncreased = false;
}
- if (enginePriv->isDebugging && rv) {
+ QQmlEngineDebugService *service = QQmlDebugConnector::service<QQmlEngineDebugService>();
+ if (service && rv) {
if (!context->isInternal)
context->asQQmlContextPrivate()->instances.append(rv);
- QQmlEngineDebugServiceImpl::instance()->objectCreated(engine, rv);
+ service->objectCreated(engine, rv);
}
return rv;
diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp
index 1ed102f0c9..df5f50644c 100644
--- a/src/qml/qml/qqmlengine.cpp
+++ b/src/qml/qml/qqmlengine.cpp
@@ -580,7 +580,7 @@ the same object as is returned from the Qt.include() call.
// Qt.include() is implemented in qv4include.cpp
QQmlEnginePrivate::QQmlEnginePrivate(QQmlEngine *e)
-: propertyCapture(0), rootContext(0), isDebugging(false),
+: propertyCapture(0), rootContext(0),
profiler(0), outputWarningsToMsgLog(true),
cleanup(0), erroredBindings(0), inProgressCreations(0),
workerScriptEngine(0),
@@ -857,7 +857,6 @@ void QQmlEnginePrivate::init()
rootContext = new QQmlContext(q,true);
if (QCoreApplication::instance()->thread() == q->thread() && QQmlDebugConnector::instance()) {
- isDebugging = true;
QQmlDebugConnector::instance()->open();
QQmlDebugConnector::instance()->addEngine(q);
}
@@ -936,8 +935,9 @@ QQmlEngine::QQmlEngine(QQmlEnginePrivate &dd, QObject *parent)
QQmlEngine::~QQmlEngine()
{
Q_D(QQmlEngine);
- if (d->isDebugging)
- QQmlDebugConnector::instance()->removeEngine(this);
+ QQmlDebugConnector *server = QQmlDebugConnector::instance();
+ if (server)
+ server->removeEngine(this);
d->typeLoader.invalidate();
diff --git a/src/qml/qml/qqmlengine_p.h b/src/qml/qml/qqmlengine_p.h
index 1a317f6fbd..26ee3bd655 100644
--- a/src/qml/qml/qqmlengine_p.h
+++ b/src/qml/qml/qqmlengine_p.h
@@ -128,7 +128,6 @@ public:
QRecyclePool<QQmlJavaScriptExpressionGuard> jsExpressionGuardPool;
QQmlContext *rootContext;
- bool isDebugging;
QQmlProfiler *profiler;
void enableProfiler();
diff --git a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp
index 4f750bb31b..c0e3b4129b 100644
--- a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp
+++ b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp
@@ -41,8 +41,8 @@
#include <private/qv8engine_p.h>
#include <QFileInfo>
-#include <private/qqmlprofilerservice_p.h>
#include <private/qqmldebugconnector_p.h>
+#include <private/qqmldebugserviceinterfaces_p.h>
#include <private/qqmlglobal_p.h>
#include <private/qqmlplatform_p.h>
@@ -1448,10 +1448,11 @@ QV4::ReturnedValue ConsoleObject::method_profile(CallContext *ctx)
const QByteArray baSource = frame.source.toUtf8();
const QByteArray baFunction = frame.function.toUtf8();
QMessageLogger logger(baSource.constData(), frame.line, baFunction.constData());
- if (!QQmlDebugConnector::instance()) {
+ QQmlProfilerService *service = QQmlDebugConnector::service<QQmlProfilerService>();
+ if (!service) {
logger.warning("Cannot start profiling because debug service is disabled. Start with -qmljsdebugger=port:XXXXX.");
} else {
- QQmlProfilerServiceImpl::instance()->startProfiling(v4->qmlEngine());
+ service->startProfiling(v4->qmlEngine());
logger.debug("Profiling started.");
}
@@ -1467,10 +1468,11 @@ QV4::ReturnedValue ConsoleObject::method_profileEnd(CallContext *ctx)
const QByteArray baFunction = frame.function.toUtf8();
QMessageLogger logger(baSource.constData(), frame.line, baFunction.constData());
- if (!QQmlDebugConnector::instance()) {
+ QQmlProfilerService *service = QQmlDebugConnector::service<QQmlProfilerService>();
+ if (!service) {
logger.warning("Ignoring console.profileEnd(): the debug service is disabled.");
} else {
- QQmlProfilerServiceImpl::instance()->stopProfiling(v4->qmlEngine());
+ service->stopProfiling(v4->qmlEngine());
logger.debug("Profiling ended.");
}
diff --git a/src/quick/items/qquickrendercontrol.cpp b/src/quick/items/qquickrendercontrol.cpp
index fd4787be98..e81edecde9 100644
--- a/src/quick/items/qquickrendercontrol.cpp
+++ b/src/quick/items/qquickrendercontrol.cpp
@@ -46,7 +46,6 @@
#include <QtQuick/QQuickWindow>
#include <QtQuick/private/qquickwindow_p.h>
-#include <private/qqmlprofilerservice_p.h>
#include <QtCore/private/qobject_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick/items/qquickview.cpp b/src/quick/items/qquickview.cpp
index 2fbd68b688..0b3cfa17b5 100644
--- a/src/quick/items/qquickview.cpp
+++ b/src/quick/items/qquickview.cpp
@@ -40,7 +40,7 @@
#include <private/qqmldebugconnector_p.h>
#include <private/qquickprofiler_p.h>
-#include <private/qqmlinspectorservice_p.h>
+#include <private/qqmldebugserviceinterfaces_p.h>
#include <private/qqmlmemoryprofiler_p.h>
#include <QtQml/qqmlengine.h>
@@ -87,8 +87,9 @@ void QQuickViewPrivate::init(QQmlEngine* e)
rootItemMarker.set(v4, v);
}
- if (QQmlDebugConnector::instance())
- QQmlInspectorServiceImpl::instance()->addView(q);
+ QQmlInspectorService *service = QQmlDebugConnector::service<QQmlInspectorService>();
+ if (service)
+ service->addView(q);
}
QQuickViewPrivate::QQuickViewPrivate()
@@ -98,8 +99,9 @@ QQuickViewPrivate::QQuickViewPrivate()
QQuickViewPrivate::~QQuickViewPrivate()
{
- if (QQmlDebugConnector::instance())
- QQmlInspectorServiceImpl::instance()->removeView(q_func());
+ QQmlInspectorService *service = QQmlDebugConnector::service<QQmlInspectorService>();
+ if (service)
+ service->removeView(q_func());
}
void QQuickViewPrivate::execute()
diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp
index 6b6b86c1e2..501b1073a7 100644
--- a/src/quick/items/qquickwindow.cpp
+++ b/src/quick/items/qquickwindow.cpp
@@ -64,7 +64,6 @@
#include <QtQuick/private/qquickpixmapcache_p.h>
-#include <private/qqmlprofilerservice_p.h>
#include <private/qqmlmemoryprofiler_p.h>
#include <private/qopenglvertexarrayobject_p.h>
diff --git a/src/quick/qtquick2.cpp b/src/quick/qtquick2.cpp
index acf7c3e3fe..ecf6865895 100644
--- a/src/quick/qtquick2.cpp
+++ b/src/quick/qtquick2.cpp
@@ -38,8 +38,8 @@
#include <private/qquickitemsmodule_p.h>
#include <private/qquickaccessiblefactory_p.h>
-#include <private/qqmlenginedebugservice_p.h>
#include <private/qqmldebugconnector_p.h>
+#include <private/qqmldebugserviceinterfaces_p.h>
#include <private/qqmldebugstatesdelegate_p.h>
#include <private/qqmlbinding_p.h>
#include <private/qqmlcontext_p.h>
@@ -187,11 +187,13 @@ void QQmlQtQuick2Module::defineModule()
QAccessible::installFactory(&qQuickAccessibleFactory);
#endif
- if (QQmlDebugConnector::instance()) {
- QQmlEngineDebugServiceImpl::instance()->setStatesDelegate(
- new QQmlQtQuick2DebugStatesDelegate);
- QQuickProfiler::initialize();
- }
+ QQmlEngineDebugService *debugService = QQmlDebugConnector::service<QQmlEngineDebugService>();
+ if (debugService)
+ debugService->setStatesDelegate(new QQmlQtQuick2DebugStatesDelegate);
+
+ QQmlProfilerService *profilerService = QQmlDebugConnector::service<QQmlProfilerService>();
+ if (profilerService)
+ QQuickProfiler::initialize(profilerService);
}
void QQmlQtQuick2Module::undefineModule()
diff --git a/src/quick/scenegraph/qsgcontext.cpp b/src/quick/scenegraph/qsgcontext.cpp
index d3879d2958..150f8475d8 100644
--- a/src/quick/scenegraph/qsgcontext.cpp
+++ b/src/quick/scenegraph/qsgcontext.cpp
@@ -63,8 +63,6 @@
#include <private/qobject_p.h>
#include <qmutex.h>
-#include <private/qqmlprofilerservice_p.h>
-
DEFINE_BOOL_CONFIG_OPTION(qmlDisableDistanceField, QML_DISABLE_DISTANCEFIELD)
/*
diff --git a/src/quick/scenegraph/qsgthreadedrenderloop.cpp b/src/quick/scenegraph/qsgthreadedrenderloop.cpp
index cc0b81194b..9a7407b421 100644
--- a/src/quick/scenegraph/qsgthreadedrenderloop.cpp
+++ b/src/quick/scenegraph/qsgthreadedrenderloop.cpp
@@ -54,7 +54,7 @@
#include <private/qquickanimatorcontroller_p.h>
#include <private/qquickprofiler_p.h>
-#include <private/qqmldebugservice_p.h>
+#include <private/qqmldebugserviceinterfaces_p.h>
#include <private/qqmldebugconnector_p.h>
#include <private/qquickshadereffectnode_p.h>
@@ -689,7 +689,7 @@ void QSGRenderThread::run()
qCDebug(QSG_LOG_RENDERLOOP) << QSG_RT_PAD << "run()";
animatorDriver = sgrc->sceneGraphContext()->createAnimationDriver(0);
animatorDriver->install();
- if (QQmlDebugConnector::instance())
+ if (QQmlDebugConnector::service<QQmlProfilerService>())
QQuickProfiler::registerAnimationCallback();
while (active) {
diff --git a/src/quick/util/qquickprofiler.cpp b/src/quick/util/qquickprofiler.cpp
index c3cd062c60..77ffda474a 100644
--- a/src/quick/util/qquickprofiler.cpp
+++ b/src/quick/util/qquickprofiler.cpp
@@ -33,8 +33,7 @@
#include "qquickprofiler_p.h"
#include <QCoreApplication>
-#include <private/qqmldebugservice_p.h>
-#include <private/qqmlprofilerservice_p.h>
+#include <private/qqmldebugserviceinterfaces_p.h>
QT_BEGIN_NAMESPACE
@@ -124,12 +123,11 @@ qint64 QQuickProfiler::sendMessages(qint64 until, QList<QByteArray> &messages)
return -1;
}
-void QQuickProfiler::initialize()
+void QQuickProfiler::initialize(QQmlProfilerService *service)
{
Q_ASSERT(s_instance == 0);
- QQmlProfilerServiceImpl *service = QQmlProfilerServiceImpl::instance();
s_instance = new QQuickProfiler(service);
- QQmlProfilerServiceImpl::instance()->addGlobalProfiler(s_instance);
+ service->addGlobalProfiler(s_instance);
}
void animationTimerCallback(qint64 delta)
diff --git a/src/quick/util/qquickprofiler_p.h b/src/quick/util/qquickprofiler_p.h
index 85a03fb57b..2eec9bf877 100644
--- a/src/quick/util/qquickprofiler_p.h
+++ b/src/quick/util/qquickprofiler_p.h
@@ -318,7 +318,7 @@ public:
return featuresEnabled & (1 << QQuickProfiler::ProfileSceneGraph);
}
- static void initialize();
+ static void initialize(QQmlProfilerService *service);
virtual ~QQuickProfiler();
diff --git a/src/quickwidgets/qquickwidget.cpp b/src/quickwidgets/qquickwidget.cpp
index e6892bd323..5755271fe1 100644
--- a/src/quickwidgets/qquickwidget.cpp
+++ b/src/quickwidgets/qquickwidget.cpp
@@ -41,7 +41,7 @@
#include <private/qqmldebugconnector_p.h>
#include <private/qquickprofiler_p.h>
-#include <private/qqmlinspectorservice_p.h>
+#include <private/qqmldebugserviceinterfaces_p.h>
#include <private/qqmlmemoryprofiler_p.h>
#include <QtQml/qqmlengine.h>
@@ -96,8 +96,9 @@ void QQuickWidgetPrivate::init(QQmlEngine* e)
if (!engine.data()->incubationController())
engine.data()->setIncubationController(offscreenWindow->incubationController());
- if (QQmlDebugConnector::instance())
- QQmlInspectorServiceImpl::instance()->addView(q);
+ QQmlInspectorService *service = QQmlDebugConnector::service<QQmlInspectorService>();
+ if (service)
+ service->addView(q);
#ifndef QT_NO_DRAGANDDROP
q->setAcceptDrops(true);
@@ -149,8 +150,9 @@ QQuickWidgetPrivate::QQuickWidgetPrivate()
QQuickWidgetPrivate::~QQuickWidgetPrivate()
{
- if (QQmlDebugConnector::instance())
- QQmlInspectorServiceImpl::instance()->removeView(q_func());
+ QQmlInspectorService *service = QQmlDebugConnector::service<QQmlInspectorService>();
+ if (service)
+ service->removeView(q_func());
invalidateRenderControl();