Skip to content
Snippets Groups Projects
Commit 3982bc22 authored by Marco Bubke's avatar Marco Bubke
Browse files

QmlDesigner.NodeInstances: QWeakPointer -> QPointer


In Qt5 QPointer should be used instead of QWeakPointer fo QObject tracking.

Change-Id: Ic9cdfaea77574bcf866716ded62bbf2d350d02f8
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@digia.com>
parent fb276230
No related branches found
No related tags found
No related merge requests found
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#define DUMMYCONTEXTOBJECT_H #define DUMMYCONTEXTOBJECT_H
#include <QObject> #include <QObject>
#include <QWeakPointer> #include <QPointer>
#include <qqml.h> #include <qqml.h>
namespace QmlDesigner { namespace QmlDesigner {
...@@ -52,7 +52,7 @@ signals: ...@@ -52,7 +52,7 @@ signals:
void parentDummyChanged(); void parentDummyChanged();
private: private:
QWeakPointer<QObject> m_dummyParent; QPointer<QObject> m_dummyParent;
}; };
} // namespace QmlDesigner } // namespace QmlDesigner
......
...@@ -55,7 +55,7 @@ protected: ...@@ -55,7 +55,7 @@ protected:
private: private:
ObjectNodeInstanceWeakPointer m_nodeInstance; ObjectNodeInstanceWeakPointer m_nodeInstance;
QString m_prefix; QString m_prefix;
QWeakPointer<QQmlContext> m_context; QPointer<QQmlContext> m_context;
}; };
} // namespace Internal } // namespace Internal
......
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include <QVector> #include <QVector>
#include <QSet> #include <QSet>
#include <QStringList> #include <QStringList>
#include <QPointer>
#include <nodeinstanceserverinterface.h> #include <nodeinstanceserverinterface.h>
#include "servernodeinstance.h" #include "servernodeinstance.h"
...@@ -206,9 +207,9 @@ private: ...@@ -206,9 +207,9 @@ private:
QHash<QObject*, ServerNodeInstance> m_objectInstanceHash; QHash<QObject*, ServerNodeInstance> m_objectInstanceHash;
QMultiHash<QString, ObjectPropertyPair> m_fileSystemWatcherHash; QMultiHash<QString, ObjectPropertyPair> m_fileSystemWatcherHash;
QList<QPair<QString, QWeakPointer<QObject> > > m_dummyObjectList; QList<QPair<QString, QWeakPointer<QObject> > > m_dummyObjectList;
QWeakPointer<QFileSystemWatcher> m_fileSystemWatcher; QPointer<QFileSystemWatcher> m_fileSystemWatcher;
QWeakPointer<QFileSystemWatcher> m_dummdataFileSystemWatcher; QPointer<QFileSystemWatcher> m_dummdataFileSystemWatcher;
QWeakPointer<Internal::ChildrenChangeEventFilter> m_childrenChangeEventFilter; QPointer<Internal::ChildrenChangeEventFilter> m_childrenChangeEventFilter;
QUrl m_fileUrl; QUrl m_fileUrl;
NodeInstanceClientInterface *m_nodeInstanceClient; NodeInstanceClientInterface *m_nodeInstanceClient;
int m_timer; int m_timer;
...@@ -217,9 +218,9 @@ private: ...@@ -217,9 +218,9 @@ private:
int m_slowRenderTimerInterval; int m_slowRenderTimerInterval;
QVector<InstancePropertyPair> m_changedPropertyList; QVector<InstancePropertyPair> m_changedPropertyList;
QStringList m_importList; QStringList m_importList;
QWeakPointer<QObject> m_dummyContextObject; QPointer<QObject> m_dummyContextObject;
QWeakPointer<QQmlComponent> m_importComponent; QPointer<QQmlComponent> m_importComponent;
QWeakPointer<QObject> m_importComponentObject; QPointer<QObject> m_importComponentObject;
}; };
} }
......
...@@ -197,10 +197,10 @@ private: ...@@ -197,10 +197,10 @@ private:
qint32 m_instanceId; qint32 m_instanceId;
QString m_id; QString m_id;
QWeakPointer<NodeInstanceServer> m_nodeInstanceServer; QPointer<NodeInstanceServer> m_nodeInstanceServer;
QString m_parentProperty; QString m_parentProperty;
bool m_deleteHeldInstance; bool m_deleteHeldInstance;
QWeakPointer<QObject> m_object; QPointer<QObject> m_object;
NodeInstanceMetaObject *m_metaObject; NodeInstanceMetaObject *m_metaObject;
NodeInstanceSignalSpy m_signalSpy; NodeInstanceSignalSpy m_signalSpy;
bool m_isInPositioner; bool m_isInPositioner;
......
...@@ -67,7 +67,7 @@ protected: ...@@ -67,7 +67,7 @@ protected:
QList<QQuickItem*> allItems() const; QList<QQuickItem*> allItems() const;
private: private:
QWeakPointer<QQuickView> m_quickView; QPointer<QQuickView> m_quickView;
DesignerSupport *m_designerSupport; DesignerSupport *m_designerSupport;
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment