Commit c7b1ae1e authored by Marco Bubke's avatar Marco Bubke
Browse files

QmlDesigner: Exchange QWeakPointer with QPointer



Because we compile only with Qt 5.

Change-Id: I2c6496f37550438f7c8ccbf8af0090c525b87d8f
Reviewed-by: default avatarTim Jenssen <tim.jenssen@digia.com>
parent 811f74ce
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include <qmldesignercorelib_global.h> #include <qmldesignercorelib_global.h>
#include <abstractview.h> #include <abstractview.h>
#include <QPointF> #include <QPointF>
#include <QPointer>
#ifndef SELECTIONCONTEXT_H #ifndef SELECTIONCONTEXT_H
#define SELECTIONCONTEXT_H #define SELECTIONCONTEXT_H
...@@ -67,7 +68,7 @@ public: ...@@ -67,7 +68,7 @@ public:
bool isValid() const; bool isValid() const;
private: private:
QWeakPointer<AbstractView> m_view; QPointer<AbstractView> m_view;
ModelNode m_targetNode; ModelNode m_targetNode;
bool m_showSelectionTools; bool m_showSelectionTools;
QPointF m_scenePosition; QPointF m_scenePosition;
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
#include <QObject> #include <QObject>
#include <QScopedPointer> #include <QScopedPointer>
#include <QPointer>
namespace QmlDesigner { namespace QmlDesigner {
...@@ -121,7 +121,7 @@ private: ...@@ -121,7 +121,7 @@ private:
MoveManipulator m_moveManipulator; MoveManipulator m_moveManipulator;
SelectionIndicator m_selectionIndicator; SelectionIndicator m_selectionIndicator;
QWeakPointer<FormEditorItem> m_movingItem; QPointer<FormEditorItem> m_movingItem;
RewriterTransaction m_rewriterTransaction; RewriterTransaction m_rewriterTransaction;
QmlItemNode m_dragNode; QmlItemNode m_dragNode;
QScopedPointer<Internal::TimerHandler> m_timerHandler; QScopedPointer<Internal::TimerHandler> m_timerHandler;
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#ifndef FORMEDITORITEM_H #ifndef FORMEDITORITEM_H
#define FORMEDITORITEM_H #define FORMEDITORITEM_H
#include <QWeakPointer> #include <QPointer>
#include <QGraphicsWidget> #include <QGraphicsWidget>
#include <qmlitemnode.h> #include <qmlitemnode.h>
#include "snappinglinecreator.h" #include "snappinglinecreator.h"
...@@ -125,7 +125,7 @@ private: // functions ...@@ -125,7 +125,7 @@ private: // functions
private: // variables private: // variables
SnappingLineCreator m_snappingLineCreator; SnappingLineCreator m_snappingLineCreator;
QmlItemNode m_qmlItemNode; QmlItemNode m_qmlItemNode;
QWeakPointer<QTimeLine> m_attentionTimeLine; QPointer<QTimeLine> m_attentionTimeLine;
QTransform m_inverseAttentionTransform; QTransform m_inverseAttentionTransform;
QRectF m_boundingRect; QRectF m_boundingRect;
QRectF m_paintedBoundingRect; QRectF m_paintedBoundingRect;
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#include <QGraphicsScene> #include <QGraphicsScene>
#include <QWeakPointer> #include <QPointer>
#include <QHash> #include <QHash>
#include <qmlitemnode.h> #include <qmlitemnode.h>
#include "abstractformeditortool.h" #include "abstractformeditortool.h"
...@@ -124,8 +124,8 @@ private: ...@@ -124,8 +124,8 @@ private:
FormEditorView *m_editorView; FormEditorView *m_editorView;
AbstractFormEditorTool *m_currentTool; AbstractFormEditorTool *m_currentTool;
QHash<QmlItemNode, FormEditorItem*> m_qmlItemNodeItemHash; QHash<QmlItemNode, FormEditorItem*> m_qmlItemNodeItemHash;
QWeakPointer<LayerItem> m_formLayerItem; QPointer<LayerItem> m_formLayerItem;
QWeakPointer<LayerItem> m_manipulatorLayerItem; QPointer<LayerItem> m_manipulatorLayerItem;
ModelNode m_dragNode; ModelNode m_dragNode;
bool m_showBoundingRects; bool m_showBoundingRects;
}; };
......
...@@ -143,8 +143,8 @@ private: //functions ...@@ -143,8 +143,8 @@ private: //functions
void hideNodeFromScene(const QmlItemNode &qmlItemNode); void hideNodeFromScene(const QmlItemNode &qmlItemNode);
private: //variables private: //variables
QWeakPointer<FormEditorWidget> m_formEditorWidget; QPointer<FormEditorWidget> m_formEditorWidget;
QWeakPointer<FormEditorScene> m_scene; QPointer<FormEditorScene> m_scene;
QList<AbstractCustomTool*> m_customToolList; QList<AbstractCustomTool*> m_customToolList;
MoveTool *m_moveTool; MoveTool *m_moveTool;
SelectionTool *m_selectionTool; SelectionTool *m_selectionTool;
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#define FORMEDITORWIDGET_H #define FORMEDITORWIDGET_H
#include <QWidget> #include <QWidget>
#include <QPointer>
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
class QActionGroup; class QActionGroup;
...@@ -89,20 +90,20 @@ private slots: ...@@ -89,20 +90,20 @@ private slots:
void resetNodeInstanceView(); void resetNodeInstanceView();
private: private:
QWeakPointer<FormEditorView> m_formEditorView; QPointer<FormEditorView> m_formEditorView;
QWeakPointer<FormEditorGraphicsView> m_graphicsView; QPointer<FormEditorGraphicsView> m_graphicsView;
QWeakPointer<ZoomAction> m_zoomAction; QPointer<ZoomAction> m_zoomAction;
QWeakPointer<ToolBox> m_toolBox; QPointer<ToolBox> m_toolBox;
QWeakPointer<QAction> m_transformToolAction; QPointer<QAction> m_transformToolAction;
QWeakPointer<QActionGroup> m_toolActionGroup; QPointer<QActionGroup> m_toolActionGroup;
QWeakPointer<QAction> m_snappingAction; QPointer<QAction> m_snappingAction;
QWeakPointer<QAction> m_snappingAndAnchoringAction; QPointer<QAction> m_snappingAndAnchoringAction;
QWeakPointer<QAction> m_noSnappingAction; QPointer<QAction> m_noSnappingAction;
QWeakPointer<QAction> m_showBoundingRectAction; QPointer<QAction> m_showBoundingRectAction;
QWeakPointer<QAction> m_selectOnlyContentItemsAction; QPointer<QAction> m_selectOnlyContentItemsAction;
QWeakPointer<LineEditAction> m_rootWidthAction; QPointer<LineEditAction> m_rootWidthAction;
QWeakPointer<LineEditAction> m_rootHeightAction; QPointer<LineEditAction> m_rootHeightAction;
QWeakPointer<QAction> m_resetAction; QPointer<QAction> m_resetAction;
}; };
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#ifndef MOVEMANIPULATOR_H #ifndef MOVEMANIPULATOR_H
#define MOVEMANIPULATOR_H #define MOVEMANIPULATOR_H
#include <QWeakPointer> #include <QPointer>
#include <QGraphicsItem> #include <QGraphicsItem>
#include <QHash> #include <QHash>
#include <QPointF> #include <QPointF>
...@@ -99,8 +99,8 @@ protected: ...@@ -99,8 +99,8 @@ protected:
private: private:
Snapper m_snapper; Snapper m_snapper;
QWeakPointer<LayerItem> m_layerItem; QPointer<LayerItem> m_layerItem;
QWeakPointer<FormEditorView> m_view; QPointer<FormEditorView> m_view;
QList<FormEditorItem*> m_itemList; QList<FormEditorItem*> m_itemList;
QHash<FormEditorItem*, QRectF> m_beginItemRectInSceneSpaceHash; QHash<FormEditorItem*, QRectF> m_beginItemRectInSceneSpaceHash;
QHash<FormEditorItem*, QPointF> m_beginPositionInSceneSpaceHash; QHash<FormEditorItem*, QPointF> m_beginPositionInSceneSpaceHash;
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#define NUMBERSERIESACTION_H #define NUMBERSERIESACTION_H
#include <QWidgetAction> #include <QWidgetAction>
#include <QPointer>
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
class QStandardItemModel; class QStandardItemModel;
...@@ -59,7 +60,7 @@ private slots: ...@@ -59,7 +60,7 @@ private slots:
void emitValueChanged(int index); void emitValueChanged(int index);
private: private:
QWeakPointer<QStandardItemModel> m_comboBoxModel; QPointer<QStandardItemModel> m_comboBoxModel;
int m_comboBoxModelIndex; int m_comboBoxModelIndex;
}; };
......
...@@ -47,8 +47,8 @@ public: ...@@ -47,8 +47,8 @@ public:
~ResizeControllerData(); ~ResizeControllerData();
QWeakPointer<LayerItem> layerItem; QPointer<LayerItem> layerItem;
QWeakPointer<FormEditorItem> formEditorItem; QPointer<FormEditorItem> formEditorItem;
QSharedPointer<ResizeHandleItem> topLeftItem; QSharedPointer<ResizeHandleItem> topLeftItem;
QSharedPointer<ResizeHandleItem> topRightItem; QSharedPointer<ResizeHandleItem> topRightItem;
QSharedPointer<ResizeHandleItem> bottomLeftItem; QSharedPointer<ResizeHandleItem> bottomLeftItem;
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#ifndef RESIZEMANIPULATOR_H #ifndef RESIZEMANIPULATOR_H
#define RESIZEMANIPULATOR_H #define RESIZEMANIPULATOR_H
#include <QWeakPointer> #include <QPointer>
#include "resizehandleitem.h" #include "resizehandleitem.h"
#include <snapper.h> #include <snapper.h>
#include "rewritertransaction.h" #include "rewritertransaction.h"
...@@ -67,7 +67,7 @@ protected: ...@@ -67,7 +67,7 @@ protected:
private: private:
Snapper m_snapper; Snapper m_snapper;
QWeakPointer<FormEditorView> m_view; QPointer<FormEditorView> m_view;
QList<QGraphicsItem*> m_graphicsLineList; QList<QGraphicsItem*> m_graphicsLineList;
ResizeController m_resizeController; // hold the controller so that the handle cant be deleted ResizeController m_resizeController; // hold the controller so that the handle cant be deleted
QTransform m_beginFromSceneToContentItemTransform; QTransform m_beginFromSceneToContentItemTransform;
...@@ -80,7 +80,7 @@ private: ...@@ -80,7 +80,7 @@ private:
double m_beginLeftMargin; double m_beginLeftMargin;
double m_beginRightMargin; double m_beginRightMargin;
double m_beginBottomMargin; double m_beginBottomMargin;
QWeakPointer<LayerItem> m_layerItem; QPointer<LayerItem> m_layerItem;
ResizeHandleItem *m_resizeHandle; ResizeHandleItem *m_resizeHandle;
RewriterTransaction m_rewriterTransaction; RewriterTransaction m_rewriterTransaction;
bool m_isActive; bool m_isActive;
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#ifndef SELECTIONINDICATOR_H #ifndef SELECTIONINDICATOR_H
#define SELECTIONINDICATOR_H #define SELECTIONINDICATOR_H
#include <QWeakPointer> #include <QPointer>
#include <QGraphicsPolygonItem> #include <QGraphicsPolygonItem>
#include "layeritem.h" #include "layeritem.h"
#include "formeditoritem.h" #include "formeditoritem.h"
...@@ -58,7 +58,7 @@ public: ...@@ -58,7 +58,7 @@ public:
private: private:
QHash<FormEditorItem*, QGraphicsPolygonItem *> m_indicatorShapeHash; QHash<FormEditorItem*, QGraphicsPolygonItem *> m_indicatorShapeHash;
QWeakPointer<LayerItem> m_layerItem; QPointer<LayerItem> m_layerItem;
QCursor m_cursor; QCursor m_cursor;
}; };
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#ifndef SELECTIONRECTANGLE_H #ifndef SELECTIONRECTANGLE_H
#define SELECTIONRECTANGLE_H #define SELECTIONRECTANGLE_H
#include <QWeakPointer> #include <QPointer>
#include <QGraphicsRectItem> #include <QGraphicsRectItem>
#include "layeritem.h" #include "layeritem.h"
...@@ -55,7 +55,7 @@ public: ...@@ -55,7 +55,7 @@ public:
private: private:
QGraphicsRectItem *m_controlShape; QGraphicsRectItem *m_controlShape;
QWeakPointer<LayerItem> m_layerItem; QPointer<LayerItem> m_layerItem;
}; };
} }
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#define ZOOMACTION_H #define ZOOMACTION_H
#include <QWidgetAction> #include <QWidgetAction>
#include <QPointer>
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
class QAbstractItemModel; class QAbstractItemModel;
...@@ -60,7 +61,7 @@ private slots: ...@@ -60,7 +61,7 @@ private slots:
void emitZoomLevelChanged(int index); void emitZoomLevelChanged(int index);
private: private:
QWeakPointer<QAbstractItemModel> m_comboBoxModel; QPointer<QAbstractItemModel> m_comboBoxModel;
double m_zoomLevel; double m_zoomLevel;
int m_currentComboBoxIndex; int m_currentComboBoxIndex;
}; };
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#define QMLDESIGNER_IMPORTMANAGERVIEW_H #define QMLDESIGNER_IMPORTMANAGERVIEW_H
#include <abstractview.h> #include <abstractview.h>
#include <QWeakPointer> #include <QPointer>
namespace QmlDesigner { namespace QmlDesigner {
...@@ -98,7 +98,7 @@ private slots: ...@@ -98,7 +98,7 @@ private slots:
void addImport(const Import &import); void addImport(const Import &import);
private: private:
ImportsWidget *m_importsWidget; QPointer<ImportsWidget> m_importsWidget;
}; };
} // namespace QmlDesigner } // namespace QmlDesigner
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#define COMPONENTACTION_H #define COMPONENTACTION_H
#include <QWidgetAction> #include <QWidgetAction>
#include <QWeakPointer> #include <QPointer>
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
class QComboBox; class QComboBox;
...@@ -63,7 +63,7 @@ public slots: ...@@ -63,7 +63,7 @@ public slots:
void emitCurrentComponentChanged(int index); void emitCurrentComponentChanged(int index);
private: private:
QWeakPointer<ComponentView> m_componentView; QPointer<ComponentView> m_componentView;
bool dontEmitCurrentComponentChanged; bool dontEmitCurrentComponentChanged;
}; };
......
...@@ -147,7 +147,7 @@ private: // functions ...@@ -147,7 +147,7 @@ private: // functions
private: // variables private: // variables
QScopedPointer<Model> m_documentModel; QScopedPointer<Model> m_documentModel;
QScopedPointer<Model> m_inFileComponentModel; QScopedPointer<Model> m_inFileComponentModel;
QWeakPointer<Core::IEditor> m_textEditor; QPointer<Core::IEditor> m_textEditor;
QScopedPointer<BaseTextEditModifier> m_documentTextModifier; QScopedPointer<BaseTextEditModifier> m_documentTextModifier;
QScopedPointer<ComponentTextModifier> m_inFileComponentTextModifier; QScopedPointer<ComponentTextModifier> m_inFileComponentTextModifier;
QScopedPointer<SubComponentManager> m_subComponentManager; QScopedPointer<SubComponentManager> m_subComponentManager;
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#include <abstractview.h> #include <abstractview.h>
#include <QWeakPointer> #include <QPointer>
namespace QmlDesigner { namespace QmlDesigner {
...@@ -106,7 +106,7 @@ protected: ...@@ -106,7 +106,7 @@ protected:
void updateImports(); void updateImports();
private: private:
QWeakPointer<ItemLibraryWidget> m_widget; QPointer<ItemLibraryWidget> m_widget;
ImportManagerView *m_importManagerView; ImportManagerView *m_importManagerView;
}; };
......
...@@ -125,18 +125,18 @@ private: ...@@ -125,18 +125,18 @@ private:
QSize m_itemIconSize; QSize m_itemIconSize;
QSize m_resIconSize; QSize m_resIconSize;
QWeakPointer<ItemLibraryInfo> m_itemLibraryInfo; QPointer<ItemLibraryInfo> m_itemLibraryInfo;
QWeakPointer<Internal::ItemLibraryModel> m_itemLibraryModel; QPointer<Internal::ItemLibraryModel> m_itemLibraryModel;
QWeakPointer<QFileSystemModel> m_resourcesFileSystemModel; QPointer<QFileSystemModel> m_resourcesFileSystemModel;
QWeakPointer<QStackedWidget> m_stackedWidget; QPointer<QStackedWidget> m_stackedWidget;
QWeakPointer<Utils::FancyLineEdit> m_filterLineEdit; QPointer<Utils::FancyLineEdit> m_filterLineEdit;
QScopedPointer<QQuickView> m_itemsView; QScopedPointer<QQuickView> m_itemsView;
QScopedPointer<Internal::ItemLibraryTreeView> m_resourcesView; QScopedPointer<Internal::ItemLibraryTreeView> m_resourcesView;
QWeakPointer<Model> m_model; QPointer<Model> m_model;
FilterChangeFlag m_filterFlag; FilterChangeFlag m_filterFlag;
int m_itemLibraryId; int m_itemLibraryId;
}; };
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#include <abstractview.h> #include <abstractview.h>
#include <QWeakPointer> #include <QPointer>
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
class QTreeView; class QTreeView;
...@@ -116,8 +116,8 @@ protected: //functions ...@@ -116,8 +116,8 @@ protected: //functions
private: private:
bool m_blockSelectionChangedSignal; bool m_blockSelectionChangedSignal;
QWeakPointer<NavigatorWidget> m_widget; QPointer<NavigatorWidget> m_widget;
QWeakPointer<NavigatorTreeModel> m_treeModel; QPointer<NavigatorTreeModel> m_treeModel;
friend class TestNavigator; friend class TestNavigator;
}; };
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#define NAVIGATORWIDGET_H #define NAVIGATORWIDGET_H
#include <QFrame> #include <QFrame>
#include <QPointer>
#include "navigatortreeview.h" #include "navigatortreeview.h"
...@@ -63,7 +64,7 @@ private: // functions ...@@ -63,7 +64,7 @@ private: // functions
private: // variables private: // variables
NavigatorTreeView *m_treeView; NavigatorTreeView *m_treeView;
QWeakPointer<NavigatorView> m_navigatorView; QPointer<NavigatorView> m_navigatorView;
}; };
} }
......
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