Commit d3669445 authored by Tobias Hunger's avatar Tobias Hunger

QmlPuppet: Modernize (nullptr and member initialization)

Change-Id: Ifac20a48df8702f9d31042eb8765cbaadb60b25b
Reviewed-by: Tim Jenssen's avatarTim Jenssen <tim.jenssen@qt.io>
parent 2ec0b5a0
......@@ -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
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment