forked from qt-creator/qt-creator
QmlDesigner: Exchange QWeakPointer with QPointer
Because we compile only with Qt 5. Change-Id: I2c6496f37550438f7c8ccbf8af0090c525b87d8f Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
This commit is contained in:
@@ -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:
|
|||||||
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 @@
|
|||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QScopedPointer>
|
#include <QScopedPointer>
|
||||||
|
#include <QPointer>
|
||||||
|
|
||||||
namespace QmlDesigner {
|
namespace QmlDesigner {
|
||||||
|
|
||||||
@@ -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 @@
|
|||||||
#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
|
|||||||
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 @@
|
|||||||
|
|
||||||
|
|
||||||
#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:
|
|||||||
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
|
|||||||
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 @@
|
|||||||
#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:
|
|||||||
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 @@
|
|||||||
#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:
|
|||||||
|
|
||||||
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 @@
|
|||||||
#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:
|
|||||||
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:
|
|||||||
~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 @@
|
|||||||
#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:
|
|||||||
|
|
||||||
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:
|
|||||||
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 @@
|
|||||||
#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:
|
|||||||
|
|
||||||
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 @@
|
|||||||
#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:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
QGraphicsRectItem *m_controlShape;
|
QGraphicsRectItem *m_controlShape;
|
||||||
QWeakPointer<LayerItem> m_layerItem;
|
QPointer<LayerItem> m_layerItem;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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:
|
|||||||
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 @@
|
|||||||
#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:
|
|||||||
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 @@
|
|||||||
#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:
|
|||||||
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
|
|||||||
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 @@
|
|||||||
|
|
||||||
#include <abstractview.h>
|
#include <abstractview.h>
|
||||||
|
|
||||||
#include <QWeakPointer>
|
#include <QPointer>
|
||||||
|
|
||||||
|
|
||||||
namespace QmlDesigner {
|
namespace QmlDesigner {
|
||||||
@@ -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:
|
|||||||
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 @@
|
|||||||
|
|
||||||
#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
|
|||||||
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 @@
|
|||||||
#define NAVIGATORWIDGET_H
|
#define NAVIGATORWIDGET_H
|
||||||
|
|
||||||
#include <QFrame>
|
#include <QFrame>
|
||||||
|
#include <QPointer>
|
||||||
|
|
||||||
#include "navigatortreeview.h"
|
#include "navigatortreeview.h"
|
||||||
|
|
||||||
@@ -63,7 +64,7 @@ private: // functions
|
|||||||
|
|
||||||
private: // variables
|
private: // variables
|
||||||
NavigatorTreeView *m_treeView;
|
NavigatorTreeView *m_treeView;
|
||||||
QWeakPointer<NavigatorView> m_navigatorView;
|
QPointer<NavigatorView> m_navigatorView;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
#define PLUGINPATH_H
|
#define PLUGINPATH_H
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QWeakPointer>
|
#include <QPointer>
|
||||||
#include <QList>
|
#include <QList>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
|
|
||||||
@@ -56,7 +56,7 @@ struct PluginData {
|
|||||||
QString path;
|
QString path;
|
||||||
bool failed;
|
bool failed;
|
||||||
QString errorMessage;
|
QString errorMessage;
|
||||||
QWeakPointer<QObject> instanceGuard;
|
QPointer<QObject> instanceGuard;
|
||||||
IPlugin *instance;
|
IPlugin *instance;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -35,6 +35,7 @@
|
|||||||
#include <QQuickView>
|
#include <QQuickView>
|
||||||
#include <QQmlEngine>
|
#include <QQmlEngine>
|
||||||
#include <QQmlContext>
|
#include <QQmlContext>
|
||||||
|
#include <QPointer>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
class QQmlError;
|
class QQmlError;
|
||||||
@@ -75,7 +76,7 @@ private:
|
|||||||
QWidget *m_containerWidget;
|
QWidget *m_containerWidget;
|
||||||
QUrl m_source;
|
QUrl m_source;
|
||||||
QQuickView m_view;
|
QQuickView m_view;
|
||||||
QWeakPointer<QQmlComponent> m_component;
|
QPointer<QQmlComponent> m_component;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
#include"abstractview.h"
|
#include"abstractview.h"
|
||||||
|
|
||||||
#include <QQuickImageProvider>
|
#include <QQuickImageProvider>
|
||||||
#include <QWeakPointer>
|
#include <QPointer>
|
||||||
|
|
||||||
namespace QmlDesigner {
|
namespace QmlDesigner {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
@@ -50,7 +50,7 @@ public:
|
|||||||
void setNodeInstanceView(NodeInstanceView *nodeInstanceView);
|
void setNodeInstanceView(NodeInstanceView *nodeInstanceView);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QWeakPointer<NodeInstanceView> m_nodeInstanceView;
|
QPointer<NodeInstanceView> m_nodeInstanceView;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
#define STATESEDITORMODEL_H
|
#define STATESEDITORMODEL_H
|
||||||
|
|
||||||
#include <QAbstractListModel>
|
#include <QAbstractListModel>
|
||||||
#include <QWeakPointer>
|
#include <QPointer>
|
||||||
|
|
||||||
|
|
||||||
namespace QmlDesigner {
|
namespace QmlDesigner {
|
||||||
@@ -70,7 +70,7 @@ signals:
|
|||||||
void changedToState(int n);
|
void changedToState(int n);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QWeakPointer<StatesEditorView> m_statesEditorView;
|
QPointer<StatesEditorView> m_statesEditorView;
|
||||||
int m_updateCounter;
|
int m_updateCounter;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -116,8 +116,8 @@ private:
|
|||||||
void checkForWindow();
|
void checkForWindow();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QWeakPointer<StatesEditorModel> m_statesEditorModel;
|
QPointer<StatesEditorModel> m_statesEditorModel;
|
||||||
QWeakPointer<StatesEditorWidget> m_statesEditorWidget;
|
QPointer<StatesEditorWidget> m_statesEditorWidget;
|
||||||
int m_lastIndex;
|
int m_lastIndex;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -31,6 +31,7 @@
|
|||||||
#define STATESEDITORWIDGET_H
|
#define STATESEDITORWIDGET_H
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
#include <QPointer>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
class QQuickView;
|
class QQuickView;
|
||||||
@@ -68,8 +69,8 @@ public:
|
|||||||
private slots:
|
private slots:
|
||||||
void reloadQmlSource();
|
void reloadQmlSource();
|
||||||
private:
|
private:
|
||||||
QWeakPointer<QQuickView> m_quickView;
|
QPointer<QQuickView> m_quickView;
|
||||||
QWeakPointer<StatesEditorView> m_statesEditorView;
|
QPointer<StatesEditorView> m_statesEditorView;
|
||||||
Internal::StatesEditorImageProvider *m_imageProvider;
|
Internal::StatesEditorImageProvider *m_imageProvider;
|
||||||
QShortcut *m_qmlSourceUpdateShortcut;
|
QShortcut *m_qmlSourceUpdateShortcut;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
#ifndef ABSTRACTPROPERTY_H
|
#ifndef ABSTRACTPROPERTY_H
|
||||||
#define ABSTRACTPROPERTY_H
|
#define ABSTRACTPROPERTY_H
|
||||||
|
|
||||||
#include <QWeakPointer>
|
#include <QPointer>
|
||||||
#include <QSharedPointer>
|
#include <QSharedPointer>
|
||||||
#include "qmldesignercorelib_global.h"
|
#include "qmldesignercorelib_global.h"
|
||||||
|
|
||||||
@@ -115,8 +115,8 @@ protected:
|
|||||||
private:
|
private:
|
||||||
PropertyName m_propertyName;
|
PropertyName m_propertyName;
|
||||||
Internal::InternalNodePointer m_internalNode;
|
Internal::InternalNodePointer m_internalNode;
|
||||||
QWeakPointer<Model> m_model;
|
QPointer<Model> m_model;
|
||||||
QWeakPointer<AbstractView> m_view;
|
QPointer<AbstractView> m_view;
|
||||||
};
|
};
|
||||||
|
|
||||||
QMLDESIGNERCORE_EXPORT bool operator ==(const AbstractProperty &property1, const AbstractProperty &property2);
|
QMLDESIGNERCORE_EXPORT bool operator ==(const AbstractProperty &property1, const AbstractProperty &property2);
|
||||||
|
|||||||
@@ -39,6 +39,7 @@
|
|||||||
#include <commondefines.h>
|
#include <commondefines.h>
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
#include <QPointer>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
class QStyle;
|
class QStyle;
|
||||||
@@ -116,7 +117,6 @@ class QMLDESIGNERCORE_EXPORT AbstractView : public QObject
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
Q_FLAGS(PropertyChangeFlag PropertyChangeFlags)
|
Q_FLAGS(PropertyChangeFlag PropertyChangeFlags)
|
||||||
typedef QWeakPointer<AbstractView> Pointer;
|
|
||||||
|
|
||||||
enum PropertyChangeFlag {
|
enum PropertyChangeFlag {
|
||||||
NoAdditionalChanges = 0x0,
|
NoAdditionalChanges = 0x0,
|
||||||
@@ -261,7 +261,7 @@ private: //functions
|
|||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QWeakPointer<Model> m_model;
|
QPointer<Model> m_model;
|
||||||
};
|
};
|
||||||
|
|
||||||
QMLDESIGNERCORE_EXPORT QList<Internal::InternalNodePointer> toInternalNodeList(const QList<ModelNode> &nodeList);
|
QMLDESIGNERCORE_EXPORT QList<Internal::InternalNodePointer> toInternalNodeList(const QList<ModelNode> &nodeList);
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ template <class ViewType>
|
|||||||
class ForwardView : public AbstractView
|
class ForwardView : public AbstractView
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef QWeakPointer<ForwardView> Pointer;
|
typedef QPointer<ForwardView> Pointer;
|
||||||
typedef typename ViewType::Pointer ViewTypePointer;
|
typedef typename ViewType::Pointer ViewTypePointer;
|
||||||
|
|
||||||
ForwardView(QObject *parent);
|
ForwardView(QObject *parent);
|
||||||
|
|||||||
@@ -33,7 +33,8 @@
|
|||||||
#include "qmldesignercorelib_global.h"
|
#include "qmldesignercorelib_global.h"
|
||||||
|
|
||||||
#include "propertycontainer.h"
|
#include "propertycontainer.h"
|
||||||
#include <QSharedPointer>
|
#include <QPointer>
|
||||||
|
|
||||||
|
|
||||||
namespace QmlDesigner {
|
namespace QmlDesigner {
|
||||||
|
|
||||||
@@ -119,7 +120,7 @@ private: // functions
|
|||||||
|
|
||||||
private: // variables
|
private: // variables
|
||||||
QHash<QString, ItemLibraryEntry> m_nameToEntryHash;
|
QHash<QString, ItemLibraryEntry> m_nameToEntryHash;
|
||||||
QWeakPointer<ItemLibraryInfo> m_baseInfo;
|
QPointer<ItemLibraryInfo> m_baseInfo;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace QmlDesigner
|
} // namespace QmlDesigner
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
#define MODELMERGER_H
|
#define MODELMERGER_H
|
||||||
|
|
||||||
|
|
||||||
#include <QWeakPointer>
|
#include <QPointer>
|
||||||
|
|
||||||
namespace QmlDesigner {
|
namespace QmlDesigner {
|
||||||
|
|
||||||
@@ -51,7 +51,7 @@ protected:
|
|||||||
{ return m_view.data(); }
|
{ return m_view.data(); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QWeakPointer<AbstractView> m_view;
|
QPointer<AbstractView> m_view;
|
||||||
};
|
};
|
||||||
|
|
||||||
} //namespace QmlDesigner
|
} //namespace QmlDesigner
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
#define MODELNODE_H
|
#define MODELNODE_H
|
||||||
|
|
||||||
#include "qmldesignercorelib_global.h"
|
#include "qmldesignercorelib_global.h"
|
||||||
#include <QWeakPointer>
|
#include <QPointer>
|
||||||
#include <QList>
|
#include <QList>
|
||||||
#include <QVariant>
|
#include <QVariant>
|
||||||
|
|
||||||
@@ -196,8 +196,8 @@ private: // functions
|
|||||||
|
|
||||||
private: // variables
|
private: // variables
|
||||||
Internal::InternalNodePointer m_internalNode;
|
Internal::InternalNodePointer m_internalNode;
|
||||||
QWeakPointer<Model> m_model;
|
QPointer<Model> m_model;
|
||||||
QWeakPointer<AbstractView> m_view;
|
QPointer<AbstractView> m_view;
|
||||||
};
|
};
|
||||||
|
|
||||||
QMLDESIGNERCORE_EXPORT bool operator ==(const ModelNode &firstNode, const ModelNode &secondNode);
|
QMLDESIGNERCORE_EXPORT bool operator ==(const ModelNode &firstNode, const ModelNode &secondNode);
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
#define NODEANCHORS_H
|
#define NODEANCHORS_H
|
||||||
|
|
||||||
|
|
||||||
#include <QWeakPointer>
|
#include <QPointer>
|
||||||
#include <QSharedPointer>
|
#include <QSharedPointer>
|
||||||
#include "corelib_global.h"
|
#include "corelib_global.h"
|
||||||
#include <anchorline.h>
|
#include <anchorline.h>
|
||||||
@@ -103,7 +103,7 @@ private: // functions
|
|||||||
private: //variables
|
private: //variables
|
||||||
Internal::InternalNodePointer m_internalNode;
|
Internal::InternalNodePointer m_internalNode;
|
||||||
Internal::InternalNodeStatePointer m_internalNodeState;
|
Internal::InternalNodeStatePointer m_internalNodeState;
|
||||||
QWeakPointer<Model> m_model;
|
QPointer<Model> m_model;
|
||||||
};
|
};
|
||||||
|
|
||||||
CORESHARED_EXPORT QDebug operator<<(QDebug debug, const NodeAnchors &anchors);
|
CORESHARED_EXPORT QDebug operator<<(QDebug debug, const NodeAnchors &anchors);
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
|
|
||||||
#include <QHash>
|
#include <QHash>
|
||||||
#include <QImage>
|
#include <QImage>
|
||||||
#include <QWeakPointer>
|
#include <QPointer>
|
||||||
#include <QRectF>
|
#include <QRectF>
|
||||||
#include <QTime>
|
#include <QTime>
|
||||||
|
|
||||||
@@ -212,7 +212,7 @@ private: //variables
|
|||||||
QHash<ModelNode, QImage> m_statePreviewImage;
|
QHash<ModelNode, QImage> m_statePreviewImage;
|
||||||
|
|
||||||
uint m_blockUpdates;
|
uint m_blockUpdates;
|
||||||
QWeakPointer<NodeInstanceServerInterface> m_nodeInstanceServer;
|
QPointer<NodeInstanceServerInterface> m_nodeInstanceServer;
|
||||||
QImage m_baseStatePreviewImage;
|
QImage m_baseStatePreviewImage;
|
||||||
QTime m_lastCrashTime;
|
QTime m_lastCrashTime;
|
||||||
NodeInstanceServerInterface::RunModus m_runModus;
|
NodeInstanceServerInterface::RunModus m_runModus;
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
#include <QFileSystemWatcher>
|
#include <QFileSystemWatcher>
|
||||||
#include <QWeakPointer>
|
#include <QPointer>
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
|
|
||||||
namespace QmlDesigner {
|
namespace QmlDesigner {
|
||||||
@@ -76,7 +76,7 @@ private: // variables
|
|||||||
// key: canonical directory path
|
// key: canonical directory path
|
||||||
QMultiHash<QString,QString> m_dirToQualifier;
|
QMultiHash<QString,QString> m_dirToQualifier;
|
||||||
QUrl m_filePath;
|
QUrl m_filePath;
|
||||||
QWeakPointer<Model> m_model;
|
QPointer<Model> m_model;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace QmlDesigner
|
} // namespace QmlDesigner
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
#include "nodeinstanceserverinterface.h"
|
#include "nodeinstanceserverinterface.h"
|
||||||
|
|
||||||
#include <QWeakPointer>
|
#include <QPointer>
|
||||||
#include <QProcess>
|
#include <QProcess>
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
|
|
||||||
@@ -94,14 +94,14 @@ private slots:
|
|||||||
void printRenderProcessOutput();
|
void printRenderProcessOutput();
|
||||||
private:
|
private:
|
||||||
QFile m_captureFileForTest;
|
QFile m_captureFileForTest;
|
||||||
QWeakPointer<QLocalServer> m_localServer;
|
QPointer<QLocalServer> m_localServer;
|
||||||
QWeakPointer<QLocalSocket> m_firstSocket;
|
QPointer<QLocalSocket> m_firstSocket;
|
||||||
QWeakPointer<QLocalSocket> m_secondSocket;
|
QPointer<QLocalSocket> m_secondSocket;
|
||||||
QWeakPointer<QLocalSocket> m_thirdSocket;
|
QPointer<QLocalSocket> m_thirdSocket;
|
||||||
QWeakPointer<NodeInstanceView> m_nodeInstanceView;
|
QPointer<NodeInstanceView> m_nodeInstanceView;
|
||||||
QWeakPointer<QProcess> m_qmlPuppetEditorProcess;
|
QPointer<QProcess> m_qmlPuppetEditorProcess;
|
||||||
QWeakPointer<QProcess> m_qmlPuppetPreviewProcess;
|
QPointer<QProcess> m_qmlPuppetPreviewProcess;
|
||||||
QWeakPointer<QProcess> m_qmlPuppetRenderProcess;
|
QPointer<QProcess> m_qmlPuppetRenderProcess;
|
||||||
quint32 m_firstBlockSize;
|
quint32 m_firstBlockSize;
|
||||||
quint32 m_secondBlockSize;
|
quint32 m_secondBlockSize;
|
||||||
quint32 m_thirdBlockSize;
|
quint32 m_thirdBlockSize;
|
||||||
|
|||||||
@@ -53,10 +53,6 @@ class MetaInfoPrivate
|
|||||||
{
|
{
|
||||||
Q_DISABLE_COPY(MetaInfoPrivate)
|
Q_DISABLE_COPY(MetaInfoPrivate)
|
||||||
public:
|
public:
|
||||||
typedef QSharedPointer<MetaInfoPrivate> Pointer;
|
|
||||||
typedef QWeakPointer<MetaInfoPrivate> WeakPointer;
|
|
||||||
|
|
||||||
|
|
||||||
MetaInfoPrivate(MetaInfo *q);
|
MetaInfoPrivate(MetaInfo *q);
|
||||||
void clear();
|
void clear();
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
#include "invalidpropertyexception.h"
|
#include "invalidpropertyexception.h"
|
||||||
#include "invalidargumentexception.h"
|
#include "invalidargumentexception.h"
|
||||||
|
|
||||||
#include <QWeakPointer>
|
#include <QPointer>
|
||||||
|
|
||||||
#include <QHashIterator>
|
#include <QHashIterator>
|
||||||
|
|
||||||
@@ -94,7 +94,7 @@ ModelPrivate::~ModelPrivate()
|
|||||||
|
|
||||||
void ModelPrivate::detachAllViews()
|
void ModelPrivate::detachAllViews()
|
||||||
{
|
{
|
||||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList)
|
foreach (const QPointer<AbstractView> &view, m_viewList)
|
||||||
detachView(view.data(), true);
|
detachView(view.data(), true);
|
||||||
|
|
||||||
m_viewList.clear();
|
m_viewList.clear();
|
||||||
@@ -162,7 +162,7 @@ void ModelPrivate::notifyImportsChanged(const QList<Import> &addedImports, const
|
|||||||
if (nodeInstanceView())
|
if (nodeInstanceView())
|
||||||
nodeInstanceView()->importsChanged(addedImports, removedImports);
|
nodeInstanceView()->importsChanged(addedImports, removedImports);
|
||||||
|
|
||||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList)
|
foreach (const QPointer<AbstractView> &view, m_viewList)
|
||||||
view->importsChanged(addedImports, removedImports);
|
view->importsChanged(addedImports, removedImports);
|
||||||
|
|
||||||
if (resetModel)
|
if (resetModel)
|
||||||
@@ -181,7 +181,7 @@ void ModelPrivate::setFileUrl(const QUrl &fileUrl)
|
|||||||
if (oldPath != fileUrl) {
|
if (oldPath != fileUrl) {
|
||||||
m_fileUrl = fileUrl;
|
m_fileUrl = fileUrl;
|
||||||
|
|
||||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList)
|
foreach (const QPointer<AbstractView> &view, m_viewList)
|
||||||
view->fileUrlChanged(oldPath, fileUrl);
|
view->fileUrlChanged(oldPath, fileUrl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -337,7 +337,7 @@ void ModelPrivate::notifyAuxiliaryDataChanged(const InternalNodePointer &interna
|
|||||||
resetModel = true;
|
resetModel = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList) {
|
foreach (const QPointer<AbstractView> &view, m_viewList) {
|
||||||
Q_ASSERT(view != 0);
|
Q_ASSERT(view != 0);
|
||||||
ModelNode node(internalNode, model(), view.data());
|
ModelNode node(internalNode, model(), view.data());
|
||||||
view->auxiliaryDataChanged(node, name, data);
|
view->auxiliaryDataChanged(node, name, data);
|
||||||
@@ -368,7 +368,7 @@ void ModelPrivate::notifyNodeSourceChanged(const InternalNodePointer &internalNo
|
|||||||
resetModel = true;
|
resetModel = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList) {
|
foreach (const QPointer<AbstractView> &view, m_viewList) {
|
||||||
Q_ASSERT(view != 0);
|
Q_ASSERT(view != 0);
|
||||||
ModelNode node(internalNode, model(), view.data());
|
ModelNode node(internalNode, model(), view.data());
|
||||||
view->nodeSourceChanged(node, newNodeSource);
|
view->nodeSourceChanged(node, newNodeSource);
|
||||||
@@ -400,7 +400,7 @@ void ModelPrivate::notifyRootNodeTypeChanged(const QString &type, int majorVersi
|
|||||||
if (nodeInstanceView())
|
if (nodeInstanceView())
|
||||||
nodeInstanceView()->rootNodeTypeChanged(type, majorVersion, minorVersion);
|
nodeInstanceView()->rootNodeTypeChanged(type, majorVersion, minorVersion);
|
||||||
|
|
||||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList) {
|
foreach (const QPointer<AbstractView> &view, m_viewList) {
|
||||||
Q_ASSERT(view != 0);
|
Q_ASSERT(view != 0);
|
||||||
view->rootNodeTypeChanged(type, majorVersion, minorVersion);
|
view->rootNodeTypeChanged(type, majorVersion, minorVersion);
|
||||||
|
|
||||||
@@ -415,7 +415,7 @@ void ModelPrivate::notifyInstancePropertyChange(const QList<QPair<ModelNode, Pro
|
|||||||
// no need to notify the rewriter or the instance view
|
// no need to notify the rewriter or the instance view
|
||||||
|
|
||||||
typedef QPair<ModelNode, PropertyName> ModelNodePropertyPair;
|
typedef QPair<ModelNode, PropertyName> ModelNodePropertyPair;
|
||||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList) {
|
foreach (const QPointer<AbstractView> &view, m_viewList) {
|
||||||
Q_ASSERT(view != 0);
|
Q_ASSERT(view != 0);
|
||||||
|
|
||||||
QList<QPair<ModelNode, PropertyName> > adaptedPropertyList;
|
QList<QPair<ModelNode, PropertyName> > adaptedPropertyList;
|
||||||
@@ -443,7 +443,7 @@ void ModelPrivate::notifyInstancesCompleted(const QVector<ModelNode> &nodeVector
|
|||||||
resetModel = true;
|
resetModel = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList) {
|
foreach (const QPointer<AbstractView> &view, m_viewList) {
|
||||||
Q_ASSERT(view != 0);
|
Q_ASSERT(view != 0);
|
||||||
view->instancesCompleted(toModelNodeVector(internalVector, view.data()));
|
view->instancesCompleted(toModelNodeVector(internalVector, view.data()));
|
||||||
}
|
}
|
||||||
@@ -481,7 +481,7 @@ void ModelPrivate::notifyInstancesInformationsChange(const QMultiHash<ModelNode,
|
|||||||
resetModel = true;
|
resetModel = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList) {
|
foreach (const QPointer<AbstractView> &view, m_viewList) {
|
||||||
Q_ASSERT(view != 0);
|
Q_ASSERT(view != 0);
|
||||||
view->instanceInformationsChange(convertModelNodeInformationHash(informationChangeHash, view.data()));
|
view->instanceInformationsChange(convertModelNodeInformationHash(informationChangeHash, view.data()));
|
||||||
}
|
}
|
||||||
@@ -508,7 +508,7 @@ void ModelPrivate::notifyInstancesRenderImageChanged(const QVector<ModelNode> &n
|
|||||||
resetModel = true;
|
resetModel = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList) {
|
foreach (const QPointer<AbstractView> &view, m_viewList) {
|
||||||
Q_ASSERT(view != 0);
|
Q_ASSERT(view != 0);
|
||||||
view->instancesRenderImageChanged(toModelNodeVector(internalVector, view.data()));
|
view->instancesRenderImageChanged(toModelNodeVector(internalVector, view.data()));
|
||||||
}
|
}
|
||||||
@@ -535,7 +535,7 @@ void ModelPrivate::notifyInstancesPreviewImageChanged(const QVector<ModelNode> &
|
|||||||
resetModel = true;
|
resetModel = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList) {
|
foreach (const QPointer<AbstractView> &view, m_viewList) {
|
||||||
Q_ASSERT(view != 0);
|
Q_ASSERT(view != 0);
|
||||||
view->instancesPreviewImageChanged(toModelNodeVector(internalVector, view.data()));
|
view->instancesPreviewImageChanged(toModelNodeVector(internalVector, view.data()));
|
||||||
}
|
}
|
||||||
@@ -562,7 +562,7 @@ void ModelPrivate::notifyInstancesChildrenChanged(const QVector<ModelNode> &node
|
|||||||
resetModel = true;
|
resetModel = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList) {
|
foreach (const QPointer<AbstractView> &view, m_viewList) {
|
||||||
Q_ASSERT(view != 0);
|
Q_ASSERT(view != 0);
|
||||||
view->instancesChildrenChanged(toModelNodeVector(internalVector, view.data()));
|
view->instancesChildrenChanged(toModelNodeVector(internalVector, view.data()));
|
||||||
}
|
}
|
||||||
@@ -589,7 +589,7 @@ void ModelPrivate::notifyCurrentStateChanged(const ModelNode &node)
|
|||||||
resetModel = true;
|
resetModel = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList) {
|
foreach (const QPointer<AbstractView> &view, m_viewList) {
|
||||||
Q_ASSERT(view != 0);
|
Q_ASSERT(view != 0);
|
||||||
view->currentStateChanged(ModelNode(node.internalNode(), model(), view.data()));
|
view->currentStateChanged(ModelNode(node.internalNode(), model(), view.data()));
|
||||||
}
|
}
|
||||||
@@ -614,7 +614,7 @@ void ModelPrivate::notifyRewriterBeginTransaction()
|
|||||||
resetModel = true;
|
resetModel = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList) {
|
foreach (const QPointer<AbstractView> &view, m_viewList) {
|
||||||
Q_ASSERT(view != 0);
|
Q_ASSERT(view != 0);
|
||||||
view->rewriterBeginTransaction();
|
view->rewriterBeginTransaction();
|
||||||
}
|
}
|
||||||
@@ -639,7 +639,7 @@ void ModelPrivate::notifyRewriterEndTransaction()
|
|||||||
resetModel = true;
|
resetModel = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList) {
|
foreach (const QPointer<AbstractView> &view, m_viewList) {
|
||||||
Q_ASSERT(view != 0);
|
Q_ASSERT(view != 0);
|
||||||
view->rewriterEndTransaction();
|
view->rewriterEndTransaction();
|
||||||
}
|
}
|
||||||
@@ -667,7 +667,7 @@ void ModelPrivate::notifyInstanceToken(const QString &token, int number, const Q
|
|||||||
resetModel = true;
|
resetModel = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList) {
|
foreach (const QPointer<AbstractView> &view, m_viewList) {
|
||||||
Q_ASSERT(view != 0);
|
Q_ASSERT(view != 0);
|
||||||
view->instancesToken(token, number, toModelNodeVector(internalVector, view.data()));
|
view->instancesToken(token, number, toModelNodeVector(internalVector, view.data()));
|
||||||
}
|
}
|
||||||
@@ -694,7 +694,7 @@ void ModelPrivate::notifyCustomNotification(const AbstractView *senderView, cons
|
|||||||
resetModel = true;
|
resetModel = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList) {
|
foreach (const QPointer<AbstractView> &view, m_viewList) {
|
||||||
Q_ASSERT(view != 0);
|
Q_ASSERT(view != 0);
|
||||||
view->customNotification(senderView, identifier, toModelNodeList(internalList, view.data()), data);
|
view->customNotification(senderView, identifier, toModelNodeList(internalList, view.data()), data);
|
||||||
}
|
}
|
||||||
@@ -737,7 +737,7 @@ void ModelPrivate::notifyPropertiesRemoved(const QList<PropertyPair> &propertyPa
|
|||||||
nodeInstanceView()->propertiesRemoved(propertyList);
|
nodeInstanceView()->propertiesRemoved(propertyList);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList) {
|
foreach (const QPointer<AbstractView> &view, m_viewList) {
|
||||||
QList<AbstractProperty> propertyList;
|
QList<AbstractProperty> propertyList;
|
||||||
Q_ASSERT(view != 0);
|
Q_ASSERT(view != 0);
|
||||||
foreach (const PropertyPair &propertyPair, propertyPairList) {
|
foreach (const PropertyPair &propertyPair, propertyPairList) {
|
||||||
@@ -772,7 +772,7 @@ void ModelPrivate::notifyPropertiesAboutToBeRemoved(const QList<InternalProperty
|
|||||||
resetModel = true;
|
resetModel = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList) {
|
foreach (const QPointer<AbstractView> &view, m_viewList) {
|
||||||
QList<AbstractProperty> propertyList;
|
QList<AbstractProperty> propertyList;
|
||||||
Q_ASSERT(view != 0);
|
Q_ASSERT(view != 0);
|
||||||
foreach (const InternalProperty::Pointer &property, internalPropertyList) {
|
foreach (const InternalProperty::Pointer &property, internalPropertyList) {
|
||||||
@@ -861,7 +861,7 @@ void ModelPrivate::notifyNodeCreated(const InternalNode::Pointer &newInternalNod
|
|||||||
nodeInstanceView()->nodeCreated(createdNode);
|
nodeInstanceView()->nodeCreated(createdNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList) {
|
foreach (const QPointer<AbstractView> &view, m_viewList) {
|
||||||
Q_ASSERT(view != 0);
|
Q_ASSERT(view != 0);
|
||||||
ModelNode createdNode(newInternalNodePointer, model(), view.data());
|
ModelNode createdNode(newInternalNodePointer, model(), view.data());
|
||||||
view->nodeCreated(createdNode);
|
view->nodeCreated(createdNode);
|
||||||
@@ -886,7 +886,7 @@ void ModelPrivate::notifyNodeAboutToBeRemoved(const InternalNode::Pointer &inter
|
|||||||
resetModel = true;
|
resetModel = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList) {
|
foreach (const QPointer<AbstractView> &view, m_viewList) {
|
||||||
Q_ASSERT(view != 0);
|
Q_ASSERT(view != 0);
|
||||||
ModelNode modelNode(internalNodePointer, model(), view.data());
|
ModelNode modelNode(internalNodePointer, model(), view.data());
|
||||||
view->nodeAboutToBeRemoved(modelNode);
|
view->nodeAboutToBeRemoved(modelNode);
|
||||||
@@ -926,7 +926,7 @@ void ModelPrivate::notifyNodeRemoved(const InternalNodePointer &internalNodePoin
|
|||||||
nodeInstanceView()->nodeRemoved(modelNode, parentProperty, propertyChange);
|
nodeInstanceView()->nodeRemoved(modelNode, parentProperty, propertyChange);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList) {
|
foreach (const QPointer<AbstractView> &view, m_viewList) {
|
||||||
Q_ASSERT(view != 0);
|
Q_ASSERT(view != 0);
|
||||||
ModelNode modelNode(internalNodePointer, model(), view.data());
|
ModelNode modelNode(internalNodePointer, model(), view.data());
|
||||||
NodeAbstractProperty parentProperty(parentPropertyName, parentNodePointer, model(), view.data());
|
NodeAbstractProperty parentProperty(parentPropertyName, parentNodePointer, model(), view.data());
|
||||||
@@ -953,7 +953,7 @@ void ModelPrivate::notifyNodeIdChanged(const InternalNode::Pointer& internalNode
|
|||||||
resetModel = true;
|
resetModel = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList) {
|
foreach (const QPointer<AbstractView> &view, m_viewList) {
|
||||||
Q_ASSERT(view != 0);
|
Q_ASSERT(view != 0);
|
||||||
ModelNode modelNode(internalNodePointer, model(), view.data());
|
ModelNode modelNode(internalNodePointer, model(), view.data());
|
||||||
view->nodeIdChanged(modelNode, newId, oldId);
|
view->nodeIdChanged(modelNode, newId, oldId);
|
||||||
@@ -987,7 +987,7 @@ void ModelPrivate::notifyBindingPropertiesChanged(const QList<InternalBindingPro
|
|||||||
resetModel = true;
|
resetModel = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList) {
|
foreach (const QPointer<AbstractView> &view, m_viewList) {
|
||||||
Q_ASSERT(view != 0);
|
Q_ASSERT(view != 0);
|
||||||
QList<BindingProperty> propertyList;
|
QList<BindingProperty> propertyList;
|
||||||
foreach (const InternalBindingPropertyPointer &bindingProperty, internalPropertyList) {
|
foreach (const InternalBindingPropertyPointer &bindingProperty, internalPropertyList) {
|
||||||
@@ -1028,7 +1028,7 @@ void ModelPrivate::notifySignalHandlerPropertiesChanged(const QVector<InternalSi
|
|||||||
resetModel = true;
|
resetModel = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList) {
|
foreach (const QPointer<AbstractView> &view, m_viewList) {
|
||||||
Q_ASSERT(view != 0);
|
Q_ASSERT(view != 0);
|
||||||
QVector<SignalHandlerProperty> propertyList;
|
QVector<SignalHandlerProperty> propertyList;
|
||||||
foreach (const InternalSignalHandlerPropertyPointer &signalHandlerProperty, internalPropertyList) {
|
foreach (const InternalSignalHandlerPropertyPointer &signalHandlerProperty, internalPropertyList) {
|
||||||
@@ -1070,7 +1070,7 @@ void ModelPrivate::notifyScriptFunctionsChanged(const InternalNodePointer &inter
|
|||||||
nodeInstanceView()->scriptFunctionsChanged(node, scriptFunctionList);
|
nodeInstanceView()->scriptFunctionsChanged(node, scriptFunctionList);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList) {
|
foreach (const QPointer<AbstractView> &view, m_viewList) {
|
||||||
Q_ASSERT(view != 0);
|
Q_ASSERT(view != 0);
|
||||||
|
|
||||||
ModelNode node(internalNodePointer, model(), view.data());
|
ModelNode node(internalNodePointer, model(), view.data());
|
||||||
@@ -1107,7 +1107,7 @@ void ModelPrivate::notifyVariantPropertiesChanged(const InternalNodePointer &int
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList) {
|
foreach (const QPointer<AbstractView> &view, m_viewList) {
|
||||||
QList<VariantProperty> propertyList;
|
QList<VariantProperty> propertyList;
|
||||||
Q_ASSERT(view != 0);
|
Q_ASSERT(view != 0);
|
||||||
foreach (const PropertyName &propertyName, propertyNameList) {
|
foreach (const PropertyName &propertyName, propertyNameList) {
|
||||||
@@ -1163,7 +1163,7 @@ void ModelPrivate::notifyNodeAboutToBeReparent(const InternalNodePointer &intern
|
|||||||
resetModel = true;
|
resetModel = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList) {
|
foreach (const QPointer<AbstractView> &view, m_viewList) {
|
||||||
NodeAbstractProperty newProperty;
|
NodeAbstractProperty newProperty;
|
||||||
NodeAbstractProperty oldProperty;
|
NodeAbstractProperty oldProperty;
|
||||||
|
|
||||||
@@ -1224,7 +1224,7 @@ void ModelPrivate::notifyNodeReparent(const InternalNode::Pointer &internalNodeP
|
|||||||
resetModel = true;
|
resetModel = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList) {
|
foreach (const QPointer<AbstractView> &view, m_viewList) {
|
||||||
NodeAbstractProperty newProperty;
|
NodeAbstractProperty newProperty;
|
||||||
NodeAbstractProperty oldProperty;
|
NodeAbstractProperty oldProperty;
|
||||||
|
|
||||||
@@ -1274,7 +1274,7 @@ void ModelPrivate::notifyNodeOrderChanged(const InternalNodeListPropertyPointer
|
|||||||
resetModel = true;
|
resetModel = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList) {
|
foreach (const QPointer<AbstractView> &view, m_viewList) {
|
||||||
Q_ASSERT(!view.isNull());
|
Q_ASSERT(!view.isNull());
|
||||||
view->nodeOrderChanged(NodeListProperty(internalListPropertyPointer, model(), view.data()),
|
view->nodeOrderChanged(NodeListProperty(internalListPropertyPointer, model(), view.data()),
|
||||||
ModelNode(internalNodePointer, model(), view.data()),
|
ModelNode(internalNodePointer, model(), view.data()),
|
||||||
@@ -1368,7 +1368,7 @@ QVector<Internal::InternalNode::Pointer> ModelPrivate::toInternalNodeVector(cons
|
|||||||
void ModelPrivate::changeSelectedNodes(const QList<InternalNode::Pointer> &newSelectedNodeList,
|
void ModelPrivate::changeSelectedNodes(const QList<InternalNode::Pointer> &newSelectedNodeList,
|
||||||
const QList<InternalNode::Pointer> &oldSelectedNodeList)
|
const QList<InternalNode::Pointer> &oldSelectedNodeList)
|
||||||
{
|
{
|
||||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList) {
|
foreach (const QPointer<AbstractView> &view, m_viewList) {
|
||||||
Q_ASSERT(view != 0);
|
Q_ASSERT(view != 0);
|
||||||
view->selectedNodesChanged(toModelNodeList(newSelectedNodeList, view.data()), toModelNodeList(oldSelectedNodeList, view.data()));
|
view->selectedNodesChanged(toModelNodeList(newSelectedNodeList, view.data()), toModelNodeList(oldSelectedNodeList, view.data()));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
#define MODEL_P_H
|
#define MODEL_P_H
|
||||||
|
|
||||||
#include <QList>
|
#include <QList>
|
||||||
#include <QWeakPointer>
|
#include <QPointer>
|
||||||
#include <QSet>
|
#include <QSet>
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
|
|
||||||
@@ -80,7 +80,7 @@ public:
|
|||||||
WriteLocker(ModelPrivate *model);
|
WriteLocker(ModelPrivate *model);
|
||||||
WriteLocker(Model *model);
|
WriteLocker(Model *model);
|
||||||
private: // variables
|
private: // variables
|
||||||
QWeakPointer<ModelPrivate> m_model;
|
QPointer<ModelPrivate> m_model;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ModelPrivate : public QObject {
|
class ModelPrivate : public QObject {
|
||||||
@@ -239,7 +239,7 @@ private:
|
|||||||
QList<Import> m_imports;
|
QList<Import> m_imports;
|
||||||
QList<Import> m_possibleImportList;
|
QList<Import> m_possibleImportList;
|
||||||
QList<Import> m_usedImportList;
|
QList<Import> m_usedImportList;
|
||||||
QList<QWeakPointer<AbstractView> > m_viewList;
|
QList<QPointer<AbstractView> > m_viewList;
|
||||||
QList<InternalNodePointer> m_selectedInternalNodeList;
|
QList<InternalNodePointer> m_selectedInternalNodeList;
|
||||||
QHash<QString,InternalNodePointer> m_idNodeHash;
|
QHash<QString,InternalNodePointer> m_idNodeHash;
|
||||||
QHash<qint32, InternalNodePointer> m_internalIdNodeHash;
|
QHash<qint32, InternalNodePointer> m_internalIdNodeHash;
|
||||||
@@ -247,10 +247,10 @@ private:
|
|||||||
InternalNodePointer m_currentStateNode;
|
InternalNodePointer m_currentStateNode;
|
||||||
InternalNodePointer m_rootInternalNode;
|
InternalNodePointer m_rootInternalNode;
|
||||||
QUrl m_fileUrl;
|
QUrl m_fileUrl;
|
||||||
QWeakPointer<RewriterView> m_rewriterView;
|
QPointer<RewriterView> m_rewriterView;
|
||||||
QWeakPointer<NodeInstanceView> m_nodeInstanceView;
|
QPointer<NodeInstanceView> m_nodeInstanceView;
|
||||||
QWeakPointer<TextModifier> m_textModifier;
|
QPointer<TextModifier> m_textModifier;
|
||||||
QWeakPointer<Model> m_metaInfoProxyModel;
|
QPointer<Model> m_metaInfoProxyModel;
|
||||||
bool m_writeLock;
|
bool m_writeLock;
|
||||||
qint32 m_internalIdCounter;
|
qint32 m_internalIdCounter;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ public:
|
|||||||
NodeInstanceView nodeInstanceView;
|
NodeInstanceView nodeInstanceView;
|
||||||
DesignerActionManagerView designerActionManagerView;
|
DesignerActionManagerView designerActionManagerView;
|
||||||
|
|
||||||
QList<QWeakPointer<AbstractView> > additionalViews;
|
QList<QPointer<AbstractView> > additionalViews;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -50,7 +50,7 @@ ViewManager::ViewManager()
|
|||||||
|
|
||||||
ViewManager::~ViewManager()
|
ViewManager::~ViewManager()
|
||||||
{
|
{
|
||||||
foreach (const QWeakPointer<AbstractView> &view, d->additionalViews)
|
foreach (const QPointer<AbstractView> &view, d->additionalViews)
|
||||||
delete view.data();
|
delete view.data();
|
||||||
|
|
||||||
delete d;
|
delete d;
|
||||||
@@ -137,13 +137,13 @@ void ViewManager::attachItemLibraryView()
|
|||||||
|
|
||||||
void ViewManager::attachAdditionalViews()
|
void ViewManager::attachAdditionalViews()
|
||||||
{
|
{
|
||||||
foreach (const QWeakPointer<AbstractView> &view, d->additionalViews)
|
foreach (const QPointer<AbstractView> &view, d->additionalViews)
|
||||||
currentModel()->attachView(view.data());
|
currentModel()->attachView(view.data());
|
||||||
}
|
}
|
||||||
|
|
||||||
void ViewManager::detachAdditionalViews()
|
void ViewManager::detachAdditionalViews()
|
||||||
{
|
{
|
||||||
foreach (const QWeakPointer<AbstractView> &view, d->additionalViews)
|
foreach (const QPointer<AbstractView> &view, d->additionalViews)
|
||||||
currentModel()->detachView(view.data());
|
currentModel()->detachView(view.data());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -215,7 +215,7 @@ QList<WidgetInfo> ViewManager::widgetInfos()
|
|||||||
if (d->debugView.hasWidget())
|
if (d->debugView.hasWidget())
|
||||||
widgetInfoList.append(d->debugView.widgetInfo());
|
widgetInfoList.append(d->debugView.widgetInfo());
|
||||||
|
|
||||||
foreach (const QWeakPointer<AbstractView> &abstractView, d->additionalViews) {
|
foreach (const QPointer<AbstractView> &abstractView, d->additionalViews) {
|
||||||
if (abstractView && abstractView->hasWidget())
|
if (abstractView && abstractView->hasWidget())
|
||||||
widgetInfoList.append(abstractView->widgetInfo());
|
widgetInfoList.append(abstractView->widgetInfo());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
#define WIDGETPLUGINPATH_H
|
#define WIDGETPLUGINPATH_H
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QWeakPointer>
|
#include <QPointer>
|
||||||
#include <QList>
|
#include <QList>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QStandardItem>
|
#include <QStandardItem>
|
||||||
@@ -48,8 +48,8 @@ namespace Internal {
|
|||||||
|
|
||||||
|
|
||||||
// Dumb plugin data structure. Note that whereas QObjects can
|
// Dumb plugin data structure. Note that whereas QObjects can
|
||||||
// casted to an interface, QWeakPointer does not work with the
|
// casted to an interface, QPointer does not work with the
|
||||||
// interface class, so, we need a separate QWeakPointer as a guard
|
// interface class, so, we need a separate QPointer as a guard
|
||||||
// to detect the deletion of a plugin instance which can happen
|
// to detect the deletion of a plugin instance which can happen
|
||||||
// in theory.
|
// in theory.
|
||||||
struct WidgetPluginData {
|
struct WidgetPluginData {
|
||||||
@@ -58,7 +58,7 @@ struct WidgetPluginData {
|
|||||||
QString path;
|
QString path;
|
||||||
bool failed;
|
bool failed;
|
||||||
QString errorMessage;
|
QString errorMessage;
|
||||||
QWeakPointer<QObject> instanceGuard;
|
QPointer<QObject> instanceGuard;
|
||||||
IWidgetPlugin *instance;
|
IWidgetPlugin *instance;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
#include <qmldesignercorelib_global.h>
|
#include <qmldesignercorelib_global.h>
|
||||||
|
|
||||||
#include <QWeakPointer>
|
#include <QPointer>
|
||||||
|
|
||||||
namespace QmlDesigner {
|
namespace QmlDesigner {
|
||||||
|
|
||||||
@@ -54,7 +54,7 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
AbstractView *view();
|
AbstractView *view();
|
||||||
private:
|
private:
|
||||||
QWeakPointer<AbstractView> m_view;
|
QPointer<AbstractView> m_view;
|
||||||
QByteArray m_identifier;
|
QByteArray m_identifier;
|
||||||
mutable bool m_valid;
|
mutable bool m_valid;
|
||||||
int m_identifierNumber;
|
int m_identifierNumber;
|
||||||
|
|||||||
@@ -171,7 +171,7 @@ DocumentManager::DocumentManager()
|
|||||||
|
|
||||||
DocumentManager::~DocumentManager()
|
DocumentManager::~DocumentManager()
|
||||||
{
|
{
|
||||||
foreach (const QWeakPointer<DesignDocument> &designDocument, m_designDocumentHash)
|
foreach (const QPointer<DesignDocument> &designDocument, m_designDocumentHash)
|
||||||
delete designDocument.data();
|
delete designDocument.data();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -56,8 +56,8 @@ public:
|
|||||||
static void goIntoComponent(const ModelNode &modelNode);
|
static void goIntoComponent(const ModelNode &modelNode);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QHash<Core::IEditor *,QWeakPointer<DesignDocument> > m_designDocumentHash;
|
QHash<Core::IEditor *,QPointer<DesignDocument> > m_designDocumentHash;
|
||||||
QWeakPointer<DesignDocument> m_currentDesignDocument;
|
QPointer<DesignDocument> m_currentDesignDocument;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace QmlDesigner
|
} // namespace QmlDesigner
|
||||||
|
|||||||
Reference in New Issue
Block a user