diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstanceserver.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstanceserver.cpp index aef747fb9bb7cbcb607a0f9c03d32db642608647..fb1bad0603d1f263e4ef1cc0dfa775455f4e585d 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstanceserver.cpp +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstanceserver.cpp @@ -157,7 +157,7 @@ void sortFilterImports(const QStringList &imports, QStringList *workingImports, namespace QmlDesigner { -static NodeInstanceServer *nodeInstanceServerInstance = 0; +static NodeInstanceServer *nodeInstanceServerInstance = nullptr; static void notifyPropertyChangeCallBackFunction(QObject *object, const PropertyName &propertyName) { @@ -170,11 +170,7 @@ static void (*notifyPropertyChangeCallBackPointer)(QObject *, const PropertyName NodeInstanceServer::NodeInstanceServer(NodeInstanceClientInterface *nodeInstanceClient) : NodeInstanceServerInterface(), m_childrenChangeEventFilter(new Internal::ChildrenChangeEventFilter(this)), - m_nodeInstanceClient(nodeInstanceClient), - m_timer(0), - m_renderTimerInterval(16), - m_slowRenderTimer(false), - m_slowRenderTimerInterval(200) + m_nodeInstanceClient(nodeInstanceClient) { qmlRegisterType<DummyContextObject>("QmlDesigner", 1, 0, "DummyContextObject"); @@ -184,10 +180,6 @@ NodeInstanceServer::NodeInstanceServer(NodeInstanceClientInterface *nodeInstance Internal::QmlPrivateGate::registerFixResourcePathsForObjectCallBack(); } -NodeInstanceServer::~NodeInstanceServer() -{ -} - QList<ServerNodeInstance> NodeInstanceServer::createInstances(const QVector<InstanceContainer> &containerVector) { Q_ASSERT(declarativeView() || quickView()); @@ -247,7 +239,7 @@ ServerNodeInstance NodeInstanceServer::instanceForObject(QObject *object) const bool NodeInstanceServer::hasInstanceForObject(QObject *object) const { - if (object == 0) + if (object == nullptr) return false; return m_objectInstanceHash.contains(object) && m_objectInstanceHash.value(object).isValid(); @@ -671,7 +663,7 @@ QQmlContext *NodeInstanceServer::context() const if (engine()) return rootContext(); - return 0; + return nullptr; } QQmlContext *NodeInstanceServer::rootContext() const diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstanceserver.h b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstanceserver.h index c7a0e58b32f0c1f6b02a7bbac01f8a925beb9a8c..c777c0a7a198ea5abe3abaccf7411fd1d8298e72 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstanceserver.h +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstanceserver.h @@ -71,7 +71,6 @@ public: typedef QPair<QString, QPointer<QObject> > DummyPair; explicit NodeInstanceServer(NodeInstanceClientInterface *nodeInstanceClient); - ~NodeInstanceServer(); void createInstances(const CreateInstancesCommand &command); void changeFileUrl(const ChangeFileUrlCommand &command); @@ -214,10 +213,10 @@ private: QPointer<Internal::ChildrenChangeEventFilter> m_childrenChangeEventFilter; QUrl m_fileUrl; NodeInstanceClientInterface *m_nodeInstanceClient; - int m_timer; - int m_renderTimerInterval; - bool m_slowRenderTimer; - int m_slowRenderTimerInterval; + int m_timer = 0; + int m_renderTimerInterval = 16; + bool m_slowRenderTimer = false; + int m_slowRenderTimerInterval = 200; QVector<InstancePropertyPair> m_changedPropertyList; QByteArray m_importCode; QPointer<QObject> m_dummyContextObject;