QmlDesigner: Modernize

modernize-use-using

Change-Id: Ia8eef3d97db7b99ec813a030e1f39ee492d6cf9a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Thomas Hartmann
2018-07-31 17:11:50 +02:00
parent 0c2bc9c2da
commit 2cb238471a
14 changed files with 33 additions and 30 deletions

View File

@@ -41,8 +41,8 @@ namespace Internal {
class AnchorChangesNodeInstance : public ObjectNodeInstance class AnchorChangesNodeInstance : public ObjectNodeInstance
{ {
public: public:
typedef QSharedPointer<AnchorChangesNodeInstance> Pointer; using Pointer = QSharedPointer<AnchorChangesNodeInstance>;
typedef QWeakPointer<AnchorChangesNodeInstance> WeakPointer; using WeakPointer = QWeakPointer<AnchorChangesNodeInstance>;
static Pointer create(QObject *objectToBeWrapped); static Pointer create(QObject *objectToBeWrapped);

View File

@@ -33,8 +33,8 @@ namespace Internal {
class BehaviorNodeInstance : public ObjectNodeInstance class BehaviorNodeInstance : public ObjectNodeInstance
{ {
public: public:
typedef QSharedPointer<BehaviorNodeInstance> Pointer; using Pointer = QSharedPointer<BehaviorNodeInstance>;
typedef QWeakPointer<BehaviorNodeInstance> WeakPointer; using WeakPointer = QWeakPointer<BehaviorNodeInstance>;
BehaviorNodeInstance(QObject *object); BehaviorNodeInstance(QObject *object);

View File

@@ -37,8 +37,9 @@ namespace Internal {
class ComponentNodeInstance : public ObjectNodeInstance class ComponentNodeInstance : public ObjectNodeInstance
{ {
public: public:
typedef QSharedPointer<ComponentNodeInstance> Pointer; using Pointer = QSharedPointer<ComponentNodeInstance>;
typedef QWeakPointer<ComponentNodeInstance> WeakPointer; using WeakPointer = QWeakPointer<ComponentNodeInstance>;
ComponentNodeInstance(QQmlComponent *component); ComponentNodeInstance(QQmlComponent *component);
static Pointer create(QObject *objectToBeWrapped); static Pointer create(QObject *objectToBeWrapped);

View File

@@ -35,8 +35,8 @@ namespace Internal {
class DummyNodeInstance : public ObjectNodeInstance class DummyNodeInstance : public ObjectNodeInstance
{ {
public: public:
typedef QSharedPointer<DummyNodeInstance> Pointer; using Pointer = QSharedPointer<DummyNodeInstance>;
typedef QWeakPointer<DummyNodeInstance> WeakPointer; using WeakPointer = QWeakPointer<DummyNodeInstance>;
static Pointer create(); static Pointer create();

View File

@@ -34,8 +34,8 @@ class LayoutNodeInstance : public QuickItemNodeInstance
{ {
public: public:
typedef QSharedPointer<LayoutNodeInstance> Pointer; using Pointer = QSharedPointer<LayoutNodeInstance>;
typedef QWeakPointer<LayoutNodeInstance> WeakPointer; using WeakPointer = QWeakPointer<LayoutNodeInstance>;
static Pointer create(QObject *objectToBeWrapped); static Pointer create(QObject *objectToBeWrapped);

View File

@@ -65,10 +65,11 @@ class NodeInstanceServer : public NodeInstanceServerInterface
{ {
Q_OBJECT Q_OBJECT
public: public:
typedef QPair<QPointer<QObject>, PropertyName> ObjectPropertyPair; using ObjectPropertyPair = QPair<QPointer<QObject>, PropertyName>;
typedef QPair<qint32, QString> IdPropertyPair; using IdPropertyPair = QPair<qint32, QString>;
typedef QPair<ServerNodeInstance, PropertyName> InstancePropertyPair; using InstancePropertyPair= QPair<ServerNodeInstance, PropertyName>;
typedef QPair<QString, QPointer<QObject> > DummyPair; using DummyPair = QPair<QString, QPointer<QObject> >;
explicit NodeInstanceServer(NodeInstanceClientInterface *nodeInstanceClient); explicit NodeInstanceServer(NodeInstanceClientInterface *nodeInstanceClient);

View File

@@ -36,8 +36,9 @@ namespace QmlDesigner {
namespace Internal { namespace Internal {
class ObjectNodeInstance; class ObjectNodeInstance;
typedef QSharedPointer<ObjectNodeInstance> ObjectNodeInstancePointer;
typedef QWeakPointer<ObjectNodeInstance> ObjectNodeInstanceWeakPointer; using ObjectNodeInstancePointer = QSharedPointer<ObjectNodeInstance>;
using ObjectNodeInstanceWeakPointer = QWeakPointer<ObjectNodeInstance>;
class NodeInstanceSignalSpy : public QObject class NodeInstanceSignalSpy : public QObject
{ {

View File

@@ -60,8 +60,8 @@ class WidgetNodeInstance;
class ObjectNodeInstance class ObjectNodeInstance
{ {
public: public:
typedef QSharedPointer<ObjectNodeInstance> Pointer; using Pointer = QSharedPointer<ObjectNodeInstance>;
typedef QWeakPointer<ObjectNodeInstance> WeakPointer; using WeakPointer = QWeakPointer<ObjectNodeInstance>;
virtual ~ObjectNodeInstance(); virtual ~ObjectNodeInstance();
void destroy(); void destroy();

View File

@@ -37,8 +37,8 @@ namespace Internal {
class PositionerNodeInstance : public QuickItemNodeInstance class PositionerNodeInstance : public QuickItemNodeInstance
{ {
public: public:
typedef QSharedPointer<PositionerNodeInstance> Pointer; using Pointer = QSharedPointer<PositionerNodeInstance>;
typedef QWeakPointer<PositionerNodeInstance> WeakPointer; using WeakPointer = QWeakPointer<PositionerNodeInstance>;
static Pointer create(QObject *objectToBeWrapped); static Pointer create(QObject *objectToBeWrapped);

View File

@@ -39,8 +39,8 @@ class QmlPropertyChangesNodeInstance;
class QmlPropertyChangesNodeInstance : public ObjectNodeInstance class QmlPropertyChangesNodeInstance : public ObjectNodeInstance
{ {
public: public:
typedef QSharedPointer<QmlPropertyChangesNodeInstance> Pointer; using Pointer = QSharedPointer<QmlPropertyChangesNodeInstance>;
typedef QWeakPointer<QmlPropertyChangesNodeInstance> WeakPointer; using WeakPointer = QWeakPointer<QmlPropertyChangesNodeInstance>;
static Pointer create(QObject *objectToBeWrapped); static Pointer create(QObject *objectToBeWrapped);

View File

@@ -34,8 +34,8 @@ namespace Internal {
class QmlStateNodeInstance : public ObjectNodeInstance class QmlStateNodeInstance : public ObjectNodeInstance
{ {
public: public:
typedef QSharedPointer<QmlStateNodeInstance> Pointer; using Pointer = QSharedPointer<QmlStateNodeInstance>;
typedef QWeakPointer<QmlStateNodeInstance> WeakPointer; using WeakPointer = QWeakPointer<QmlStateNodeInstance>;
static Pointer create(QObject *objectToBeWrapped); static Pointer create(QObject *objectToBeWrapped);

View File

@@ -33,8 +33,8 @@ namespace Internal {
class QmlTransitionNodeInstance : public ObjectNodeInstance class QmlTransitionNodeInstance : public ObjectNodeInstance
{ {
public: public:
typedef QSharedPointer<QmlTransitionNodeInstance> Pointer; using Pointer = QSharedPointer<QmlTransitionNodeInstance>;
typedef QWeakPointer<QmlTransitionNodeInstance> WeakPointer; using WeakPointer = QWeakPointer<QmlTransitionNodeInstance>;
static Pointer create(QObject *objectToBeWrapped); static Pointer create(QObject *objectToBeWrapped);

View File

@@ -33,8 +33,8 @@ namespace Internal {
class Qt3DPresentationNodeInstance : public ObjectNodeInstance class Qt3DPresentationNodeInstance : public ObjectNodeInstance
{ {
public: public:
typedef QSharedPointer<Qt3DPresentationNodeInstance> Pointer; using Pointer = QSharedPointer<Qt3DPresentationNodeInstance>;
typedef QWeakPointer<Qt3DPresentationNodeInstance> WeakPointer; using WeakPointer = QWeakPointer<Qt3DPresentationNodeInstance>;
static Pointer create(QObject *objectToBeWrapped); static Pointer create(QObject *objectToBeWrapped);

View File

@@ -38,8 +38,8 @@ namespace Internal {
class QuickItemNodeInstance : public ObjectNodeInstance class QuickItemNodeInstance : public ObjectNodeInstance
{ {
public: public:
typedef QSharedPointer<QuickItemNodeInstance> Pointer; using Pointer = QSharedPointer<QuickItemNodeInstance>;
typedef QWeakPointer<QuickItemNodeInstance> WeakPointer; using WeakPointer = QWeakPointer<QuickItemNodeInstance>;
~QuickItemNodeInstance() override; ~QuickItemNodeInstance() override;