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 <abstractview.h>
|
||||
#include <QPointF>
|
||||
#include <QPointer>
|
||||
|
||||
#ifndef SELECTIONCONTEXT_H
|
||||
#define SELECTIONCONTEXT_H
|
||||
@@ -67,7 +68,7 @@ public:
|
||||
bool isValid() const;
|
||||
|
||||
private:
|
||||
QWeakPointer<AbstractView> m_view;
|
||||
QPointer<AbstractView> m_view;
|
||||
ModelNode m_targetNode;
|
||||
bool m_showSelectionTools;
|
||||
QPointF m_scenePosition;
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
#include <QObject>
|
||||
#include <QScopedPointer>
|
||||
|
||||
#include <QPointer>
|
||||
|
||||
namespace QmlDesigner {
|
||||
|
||||
@@ -121,7 +121,7 @@ private:
|
||||
|
||||
MoveManipulator m_moveManipulator;
|
||||
SelectionIndicator m_selectionIndicator;
|
||||
QWeakPointer<FormEditorItem> m_movingItem;
|
||||
QPointer<FormEditorItem> m_movingItem;
|
||||
RewriterTransaction m_rewriterTransaction;
|
||||
QmlItemNode m_dragNode;
|
||||
QScopedPointer<Internal::TimerHandler> m_timerHandler;
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#ifndef FORMEDITORITEM_H
|
||||
#define FORMEDITORITEM_H
|
||||
|
||||
#include <QWeakPointer>
|
||||
#include <QPointer>
|
||||
#include <QGraphicsWidget>
|
||||
#include <qmlitemnode.h>
|
||||
#include "snappinglinecreator.h"
|
||||
@@ -125,7 +125,7 @@ private: // functions
|
||||
private: // variables
|
||||
SnappingLineCreator m_snappingLineCreator;
|
||||
QmlItemNode m_qmlItemNode;
|
||||
QWeakPointer<QTimeLine> m_attentionTimeLine;
|
||||
QPointer<QTimeLine> m_attentionTimeLine;
|
||||
QTransform m_inverseAttentionTransform;
|
||||
QRectF m_boundingRect;
|
||||
QRectF m_paintedBoundingRect;
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
|
||||
#include <QGraphicsScene>
|
||||
#include <QWeakPointer>
|
||||
#include <QPointer>
|
||||
#include <QHash>
|
||||
#include <qmlitemnode.h>
|
||||
#include "abstractformeditortool.h"
|
||||
@@ -124,8 +124,8 @@ private:
|
||||
FormEditorView *m_editorView;
|
||||
AbstractFormEditorTool *m_currentTool;
|
||||
QHash<QmlItemNode, FormEditorItem*> m_qmlItemNodeItemHash;
|
||||
QWeakPointer<LayerItem> m_formLayerItem;
|
||||
QWeakPointer<LayerItem> m_manipulatorLayerItem;
|
||||
QPointer<LayerItem> m_formLayerItem;
|
||||
QPointer<LayerItem> m_manipulatorLayerItem;
|
||||
ModelNode m_dragNode;
|
||||
bool m_showBoundingRects;
|
||||
};
|
||||
|
||||
@@ -143,8 +143,8 @@ private: //functions
|
||||
void hideNodeFromScene(const QmlItemNode &qmlItemNode);
|
||||
|
||||
private: //variables
|
||||
QWeakPointer<FormEditorWidget> m_formEditorWidget;
|
||||
QWeakPointer<FormEditorScene> m_scene;
|
||||
QPointer<FormEditorWidget> m_formEditorWidget;
|
||||
QPointer<FormEditorScene> m_scene;
|
||||
QList<AbstractCustomTool*> m_customToolList;
|
||||
MoveTool *m_moveTool;
|
||||
SelectionTool *m_selectionTool;
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#define FORMEDITORWIDGET_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QPointer>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QActionGroup;
|
||||
@@ -89,20 +90,20 @@ private slots:
|
||||
void resetNodeInstanceView();
|
||||
|
||||
private:
|
||||
QWeakPointer<FormEditorView> m_formEditorView;
|
||||
QWeakPointer<FormEditorGraphicsView> m_graphicsView;
|
||||
QWeakPointer<ZoomAction> m_zoomAction;
|
||||
QWeakPointer<ToolBox> m_toolBox;
|
||||
QWeakPointer<QAction> m_transformToolAction;
|
||||
QWeakPointer<QActionGroup> m_toolActionGroup;
|
||||
QWeakPointer<QAction> m_snappingAction;
|
||||
QWeakPointer<QAction> m_snappingAndAnchoringAction;
|
||||
QWeakPointer<QAction> m_noSnappingAction;
|
||||
QWeakPointer<QAction> m_showBoundingRectAction;
|
||||
QWeakPointer<QAction> m_selectOnlyContentItemsAction;
|
||||
QWeakPointer<LineEditAction> m_rootWidthAction;
|
||||
QWeakPointer<LineEditAction> m_rootHeightAction;
|
||||
QWeakPointer<QAction> m_resetAction;
|
||||
QPointer<FormEditorView> m_formEditorView;
|
||||
QPointer<FormEditorGraphicsView> m_graphicsView;
|
||||
QPointer<ZoomAction> m_zoomAction;
|
||||
QPointer<ToolBox> m_toolBox;
|
||||
QPointer<QAction> m_transformToolAction;
|
||||
QPointer<QActionGroup> m_toolActionGroup;
|
||||
QPointer<QAction> m_snappingAction;
|
||||
QPointer<QAction> m_snappingAndAnchoringAction;
|
||||
QPointer<QAction> m_noSnappingAction;
|
||||
QPointer<QAction> m_showBoundingRectAction;
|
||||
QPointer<QAction> m_selectOnlyContentItemsAction;
|
||||
QPointer<LineEditAction> m_rootWidthAction;
|
||||
QPointer<LineEditAction> m_rootHeightAction;
|
||||
QPointer<QAction> m_resetAction;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#ifndef MOVEMANIPULATOR_H
|
||||
#define MOVEMANIPULATOR_H
|
||||
|
||||
#include <QWeakPointer>
|
||||
#include <QPointer>
|
||||
#include <QGraphicsItem>
|
||||
#include <QHash>
|
||||
#include <QPointF>
|
||||
@@ -99,8 +99,8 @@ protected:
|
||||
|
||||
private:
|
||||
Snapper m_snapper;
|
||||
QWeakPointer<LayerItem> m_layerItem;
|
||||
QWeakPointer<FormEditorView> m_view;
|
||||
QPointer<LayerItem> m_layerItem;
|
||||
QPointer<FormEditorView> m_view;
|
||||
QList<FormEditorItem*> m_itemList;
|
||||
QHash<FormEditorItem*, QRectF> m_beginItemRectInSceneSpaceHash;
|
||||
QHash<FormEditorItem*, QPointF> m_beginPositionInSceneSpaceHash;
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#define NUMBERSERIESACTION_H
|
||||
|
||||
#include <QWidgetAction>
|
||||
#include <QPointer>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QStandardItemModel;
|
||||
@@ -59,7 +60,7 @@ private slots:
|
||||
void emitValueChanged(int index);
|
||||
|
||||
private:
|
||||
QWeakPointer<QStandardItemModel> m_comboBoxModel;
|
||||
QPointer<QStandardItemModel> m_comboBoxModel;
|
||||
int m_comboBoxModelIndex;
|
||||
};
|
||||
|
||||
|
||||
@@ -47,8 +47,8 @@ public:
|
||||
~ResizeControllerData();
|
||||
|
||||
|
||||
QWeakPointer<LayerItem> layerItem;
|
||||
QWeakPointer<FormEditorItem> formEditorItem;
|
||||
QPointer<LayerItem> layerItem;
|
||||
QPointer<FormEditorItem> formEditorItem;
|
||||
QSharedPointer<ResizeHandleItem> topLeftItem;
|
||||
QSharedPointer<ResizeHandleItem> topRightItem;
|
||||
QSharedPointer<ResizeHandleItem> bottomLeftItem;
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#ifndef RESIZEMANIPULATOR_H
|
||||
#define RESIZEMANIPULATOR_H
|
||||
|
||||
#include <QWeakPointer>
|
||||
#include <QPointer>
|
||||
#include "resizehandleitem.h"
|
||||
#include <snapper.h>
|
||||
#include "rewritertransaction.h"
|
||||
@@ -67,7 +67,7 @@ protected:
|
||||
|
||||
private:
|
||||
Snapper m_snapper;
|
||||
QWeakPointer<FormEditorView> m_view;
|
||||
QPointer<FormEditorView> m_view;
|
||||
QList<QGraphicsItem*> m_graphicsLineList;
|
||||
ResizeController m_resizeController; // hold the controller so that the handle cant be deleted
|
||||
QTransform m_beginFromSceneToContentItemTransform;
|
||||
@@ -80,7 +80,7 @@ private:
|
||||
double m_beginLeftMargin;
|
||||
double m_beginRightMargin;
|
||||
double m_beginBottomMargin;
|
||||
QWeakPointer<LayerItem> m_layerItem;
|
||||
QPointer<LayerItem> m_layerItem;
|
||||
ResizeHandleItem *m_resizeHandle;
|
||||
RewriterTransaction m_rewriterTransaction;
|
||||
bool m_isActive;
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#ifndef SELECTIONINDICATOR_H
|
||||
#define SELECTIONINDICATOR_H
|
||||
|
||||
#include <QWeakPointer>
|
||||
#include <QPointer>
|
||||
#include <QGraphicsPolygonItem>
|
||||
#include "layeritem.h"
|
||||
#include "formeditoritem.h"
|
||||
@@ -58,7 +58,7 @@ public:
|
||||
|
||||
private:
|
||||
QHash<FormEditorItem*, QGraphicsPolygonItem *> m_indicatorShapeHash;
|
||||
QWeakPointer<LayerItem> m_layerItem;
|
||||
QPointer<LayerItem> m_layerItem;
|
||||
QCursor m_cursor;
|
||||
|
||||
};
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#ifndef SELECTIONRECTANGLE_H
|
||||
#define SELECTIONRECTANGLE_H
|
||||
|
||||
#include <QWeakPointer>
|
||||
#include <QPointer>
|
||||
#include <QGraphicsRectItem>
|
||||
#include "layeritem.h"
|
||||
|
||||
@@ -55,7 +55,7 @@ public:
|
||||
|
||||
private:
|
||||
QGraphicsRectItem *m_controlShape;
|
||||
QWeakPointer<LayerItem> m_layerItem;
|
||||
QPointer<LayerItem> m_layerItem;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#define ZOOMACTION_H
|
||||
|
||||
#include <QWidgetAction>
|
||||
#include <QPointer>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QAbstractItemModel;
|
||||
@@ -60,7 +61,7 @@ private slots:
|
||||
void emitZoomLevelChanged(int index);
|
||||
|
||||
private:
|
||||
QWeakPointer<QAbstractItemModel> m_comboBoxModel;
|
||||
QPointer<QAbstractItemModel> m_comboBoxModel;
|
||||
double m_zoomLevel;
|
||||
int m_currentComboBoxIndex;
|
||||
};
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#define QMLDESIGNER_IMPORTMANAGERVIEW_H
|
||||
|
||||
#include <abstractview.h>
|
||||
#include <QWeakPointer>
|
||||
#include <QPointer>
|
||||
|
||||
namespace QmlDesigner {
|
||||
|
||||
@@ -98,7 +98,7 @@ private slots:
|
||||
void addImport(const Import &import);
|
||||
|
||||
private:
|
||||
ImportsWidget *m_importsWidget;
|
||||
QPointer<ImportsWidget> m_importsWidget;
|
||||
};
|
||||
|
||||
} // namespace QmlDesigner
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#define COMPONENTACTION_H
|
||||
|
||||
#include <QWidgetAction>
|
||||
#include <QWeakPointer>
|
||||
#include <QPointer>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QComboBox;
|
||||
@@ -63,7 +63,7 @@ public slots:
|
||||
void emitCurrentComponentChanged(int index);
|
||||
|
||||
private:
|
||||
QWeakPointer<ComponentView> m_componentView;
|
||||
QPointer<ComponentView> m_componentView;
|
||||
bool dontEmitCurrentComponentChanged;
|
||||
};
|
||||
|
||||
|
||||
@@ -147,7 +147,7 @@ private: // functions
|
||||
private: // variables
|
||||
QScopedPointer<Model> m_documentModel;
|
||||
QScopedPointer<Model> m_inFileComponentModel;
|
||||
QWeakPointer<Core::IEditor> m_textEditor;
|
||||
QPointer<Core::IEditor> m_textEditor;
|
||||
QScopedPointer<BaseTextEditModifier> m_documentTextModifier;
|
||||
QScopedPointer<ComponentTextModifier> m_inFileComponentTextModifier;
|
||||
QScopedPointer<SubComponentManager> m_subComponentManager;
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
#include <abstractview.h>
|
||||
|
||||
#include <QWeakPointer>
|
||||
#include <QPointer>
|
||||
|
||||
|
||||
namespace QmlDesigner {
|
||||
@@ -106,7 +106,7 @@ protected:
|
||||
void updateImports();
|
||||
|
||||
private:
|
||||
QWeakPointer<ItemLibraryWidget> m_widget;
|
||||
QPointer<ItemLibraryWidget> m_widget;
|
||||
ImportManagerView *m_importManagerView;
|
||||
};
|
||||
|
||||
|
||||
@@ -125,18 +125,18 @@ private:
|
||||
QSize m_itemIconSize;
|
||||
QSize m_resIconSize;
|
||||
|
||||
QWeakPointer<ItemLibraryInfo> m_itemLibraryInfo;
|
||||
QPointer<ItemLibraryInfo> m_itemLibraryInfo;
|
||||
|
||||
QWeakPointer<Internal::ItemLibraryModel> m_itemLibraryModel;
|
||||
QWeakPointer<QFileSystemModel> m_resourcesFileSystemModel;
|
||||
QPointer<Internal::ItemLibraryModel> m_itemLibraryModel;
|
||||
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<Internal::ItemLibraryTreeView> m_resourcesView;
|
||||
|
||||
QWeakPointer<Model> m_model;
|
||||
QPointer<Model> m_model;
|
||||
FilterChangeFlag m_filterFlag;
|
||||
int m_itemLibraryId;
|
||||
};
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
#include <abstractview.h>
|
||||
|
||||
#include <QWeakPointer>
|
||||
#include <QPointer>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QTreeView;
|
||||
@@ -116,8 +116,8 @@ protected: //functions
|
||||
private:
|
||||
bool m_blockSelectionChangedSignal;
|
||||
|
||||
QWeakPointer<NavigatorWidget> m_widget;
|
||||
QWeakPointer<NavigatorTreeModel> m_treeModel;
|
||||
QPointer<NavigatorWidget> m_widget;
|
||||
QPointer<NavigatorTreeModel> m_treeModel;
|
||||
|
||||
friend class TestNavigator;
|
||||
};
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#define NAVIGATORWIDGET_H
|
||||
|
||||
#include <QFrame>
|
||||
#include <QPointer>
|
||||
|
||||
#include "navigatortreeview.h"
|
||||
|
||||
@@ -63,7 +64,7 @@ private: // functions
|
||||
|
||||
private: // variables
|
||||
NavigatorTreeView *m_treeView;
|
||||
QWeakPointer<NavigatorView> m_navigatorView;
|
||||
QPointer<NavigatorView> m_navigatorView;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#define PLUGINPATH_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QWeakPointer>
|
||||
#include <QPointer>
|
||||
#include <QList>
|
||||
#include <QDir>
|
||||
|
||||
@@ -56,7 +56,7 @@ struct PluginData {
|
||||
QString path;
|
||||
bool failed;
|
||||
QString errorMessage;
|
||||
QWeakPointer<QObject> instanceGuard;
|
||||
QPointer<QObject> instanceGuard;
|
||||
IPlugin *instance;
|
||||
};
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include <QQuickView>
|
||||
#include <QQmlEngine>
|
||||
#include <QQmlContext>
|
||||
#include <QPointer>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QQmlError;
|
||||
@@ -75,7 +76,7 @@ private:
|
||||
QWidget *m_containerWidget;
|
||||
QUrl m_source;
|
||||
QQuickView m_view;
|
||||
QWeakPointer<QQmlComponent> m_component;
|
||||
QPointer<QQmlComponent> m_component;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#include"abstractview.h"
|
||||
|
||||
#include <QQuickImageProvider>
|
||||
#include <QWeakPointer>
|
||||
#include <QPointer>
|
||||
|
||||
namespace QmlDesigner {
|
||||
namespace Internal {
|
||||
@@ -50,7 +50,7 @@ public:
|
||||
void setNodeInstanceView(NodeInstanceView *nodeInstanceView);
|
||||
|
||||
private:
|
||||
QWeakPointer<NodeInstanceView> m_nodeInstanceView;
|
||||
QPointer<NodeInstanceView> m_nodeInstanceView;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#define STATESEDITORMODEL_H
|
||||
|
||||
#include <QAbstractListModel>
|
||||
#include <QWeakPointer>
|
||||
#include <QPointer>
|
||||
|
||||
|
||||
namespace QmlDesigner {
|
||||
@@ -70,7 +70,7 @@ signals:
|
||||
void changedToState(int n);
|
||||
|
||||
private:
|
||||
QWeakPointer<StatesEditorView> m_statesEditorView;
|
||||
QPointer<StatesEditorView> m_statesEditorView;
|
||||
int m_updateCounter;
|
||||
};
|
||||
|
||||
|
||||
@@ -116,8 +116,8 @@ private:
|
||||
void checkForWindow();
|
||||
|
||||
private:
|
||||
QWeakPointer<StatesEditorModel> m_statesEditorModel;
|
||||
QWeakPointer<StatesEditorWidget> m_statesEditorWidget;
|
||||
QPointer<StatesEditorModel> m_statesEditorModel;
|
||||
QPointer<StatesEditorWidget> m_statesEditorWidget;
|
||||
int m_lastIndex;
|
||||
};
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#define STATESEDITORWIDGET_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QPointer>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QQuickView;
|
||||
@@ -68,8 +69,8 @@ public:
|
||||
private slots:
|
||||
void reloadQmlSource();
|
||||
private:
|
||||
QWeakPointer<QQuickView> m_quickView;
|
||||
QWeakPointer<StatesEditorView> m_statesEditorView;
|
||||
QPointer<QQuickView> m_quickView;
|
||||
QPointer<StatesEditorView> m_statesEditorView;
|
||||
Internal::StatesEditorImageProvider *m_imageProvider;
|
||||
QShortcut *m_qmlSourceUpdateShortcut;
|
||||
};
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#ifndef ABSTRACTPROPERTY_H
|
||||
#define ABSTRACTPROPERTY_H
|
||||
|
||||
#include <QWeakPointer>
|
||||
#include <QPointer>
|
||||
#include <QSharedPointer>
|
||||
#include "qmldesignercorelib_global.h"
|
||||
|
||||
@@ -115,8 +115,8 @@ protected:
|
||||
private:
|
||||
PropertyName m_propertyName;
|
||||
Internal::InternalNodePointer m_internalNode;
|
||||
QWeakPointer<Model> m_model;
|
||||
QWeakPointer<AbstractView> m_view;
|
||||
QPointer<Model> m_model;
|
||||
QPointer<AbstractView> m_view;
|
||||
};
|
||||
|
||||
QMLDESIGNERCORE_EXPORT bool operator ==(const AbstractProperty &property1, const AbstractProperty &property2);
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
#include <commondefines.h>
|
||||
|
||||
#include <QObject>
|
||||
#include <QPointer>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QStyle;
|
||||
@@ -116,7 +117,6 @@ class QMLDESIGNERCORE_EXPORT AbstractView : public QObject
|
||||
Q_OBJECT
|
||||
public:
|
||||
Q_FLAGS(PropertyChangeFlag PropertyChangeFlags)
|
||||
typedef QWeakPointer<AbstractView> Pointer;
|
||||
|
||||
enum PropertyChangeFlag {
|
||||
NoAdditionalChanges = 0x0,
|
||||
@@ -261,7 +261,7 @@ private: //functions
|
||||
|
||||
|
||||
private:
|
||||
QWeakPointer<Model> m_model;
|
||||
QPointer<Model> m_model;
|
||||
};
|
||||
|
||||
QMLDESIGNERCORE_EXPORT QList<Internal::InternalNodePointer> toInternalNodeList(const QList<ModelNode> &nodeList);
|
||||
|
||||
@@ -45,7 +45,7 @@ template <class ViewType>
|
||||
class ForwardView : public AbstractView
|
||||
{
|
||||
public:
|
||||
typedef QWeakPointer<ForwardView> Pointer;
|
||||
typedef QPointer<ForwardView> Pointer;
|
||||
typedef typename ViewType::Pointer ViewTypePointer;
|
||||
|
||||
ForwardView(QObject *parent);
|
||||
|
||||
@@ -33,7 +33,8 @@
|
||||
#include "qmldesignercorelib_global.h"
|
||||
|
||||
#include "propertycontainer.h"
|
||||
#include <QSharedPointer>
|
||||
#include <QPointer>
|
||||
|
||||
|
||||
namespace QmlDesigner {
|
||||
|
||||
@@ -119,7 +120,7 @@ private: // functions
|
||||
|
||||
private: // variables
|
||||
QHash<QString, ItemLibraryEntry> m_nameToEntryHash;
|
||||
QWeakPointer<ItemLibraryInfo> m_baseInfo;
|
||||
QPointer<ItemLibraryInfo> m_baseInfo;
|
||||
};
|
||||
|
||||
} // namespace QmlDesigner
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#define MODELMERGER_H
|
||||
|
||||
|
||||
#include <QWeakPointer>
|
||||
#include <QPointer>
|
||||
|
||||
namespace QmlDesigner {
|
||||
|
||||
@@ -51,7 +51,7 @@ protected:
|
||||
{ return m_view.data(); }
|
||||
|
||||
private:
|
||||
QWeakPointer<AbstractView> m_view;
|
||||
QPointer<AbstractView> m_view;
|
||||
};
|
||||
|
||||
} //namespace QmlDesigner
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#define MODELNODE_H
|
||||
|
||||
#include "qmldesignercorelib_global.h"
|
||||
#include <QWeakPointer>
|
||||
#include <QPointer>
|
||||
#include <QList>
|
||||
#include <QVariant>
|
||||
|
||||
@@ -196,8 +196,8 @@ private: // functions
|
||||
|
||||
private: // variables
|
||||
Internal::InternalNodePointer m_internalNode;
|
||||
QWeakPointer<Model> m_model;
|
||||
QWeakPointer<AbstractView> m_view;
|
||||
QPointer<Model> m_model;
|
||||
QPointer<AbstractView> m_view;
|
||||
};
|
||||
|
||||
QMLDESIGNERCORE_EXPORT bool operator ==(const ModelNode &firstNode, const ModelNode &secondNode);
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#define NODEANCHORS_H
|
||||
|
||||
|
||||
#include <QWeakPointer>
|
||||
#include <QPointer>
|
||||
#include <QSharedPointer>
|
||||
#include "corelib_global.h"
|
||||
#include <anchorline.h>
|
||||
@@ -103,7 +103,7 @@ private: // functions
|
||||
private: //variables
|
||||
Internal::InternalNodePointer m_internalNode;
|
||||
Internal::InternalNodeStatePointer m_internalNodeState;
|
||||
QWeakPointer<Model> m_model;
|
||||
QPointer<Model> m_model;
|
||||
};
|
||||
|
||||
CORESHARED_EXPORT QDebug operator<<(QDebug debug, const NodeAnchors &anchors);
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
#include <QHash>
|
||||
#include <QImage>
|
||||
#include <QWeakPointer>
|
||||
#include <QPointer>
|
||||
#include <QRectF>
|
||||
#include <QTime>
|
||||
|
||||
@@ -212,7 +212,7 @@ private: //variables
|
||||
QHash<ModelNode, QImage> m_statePreviewImage;
|
||||
|
||||
uint m_blockUpdates;
|
||||
QWeakPointer<NodeInstanceServerInterface> m_nodeInstanceServer;
|
||||
QPointer<NodeInstanceServerInterface> m_nodeInstanceServer;
|
||||
QImage m_baseStatePreviewImage;
|
||||
QTime m_lastCrashTime;
|
||||
NodeInstanceServerInterface::RunModus m_runModus;
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
#include <QString>
|
||||
#include <QUrl>
|
||||
#include <QFileSystemWatcher>
|
||||
#include <QWeakPointer>
|
||||
#include <QPointer>
|
||||
#include <QFileInfo>
|
||||
|
||||
namespace QmlDesigner {
|
||||
@@ -76,7 +76,7 @@ private: // variables
|
||||
// key: canonical directory path
|
||||
QMultiHash<QString,QString> m_dirToQualifier;
|
||||
QUrl m_filePath;
|
||||
QWeakPointer<Model> m_model;
|
||||
QPointer<Model> m_model;
|
||||
};
|
||||
|
||||
} // namespace QmlDesigner
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
#include "nodeinstanceserverinterface.h"
|
||||
|
||||
#include <QWeakPointer>
|
||||
#include <QPointer>
|
||||
#include <QProcess>
|
||||
#include <QFile>
|
||||
|
||||
@@ -94,14 +94,14 @@ private slots:
|
||||
void printRenderProcessOutput();
|
||||
private:
|
||||
QFile m_captureFileForTest;
|
||||
QWeakPointer<QLocalServer> m_localServer;
|
||||
QWeakPointer<QLocalSocket> m_firstSocket;
|
||||
QWeakPointer<QLocalSocket> m_secondSocket;
|
||||
QWeakPointer<QLocalSocket> m_thirdSocket;
|
||||
QWeakPointer<NodeInstanceView> m_nodeInstanceView;
|
||||
QWeakPointer<QProcess> m_qmlPuppetEditorProcess;
|
||||
QWeakPointer<QProcess> m_qmlPuppetPreviewProcess;
|
||||
QWeakPointer<QProcess> m_qmlPuppetRenderProcess;
|
||||
QPointer<QLocalServer> m_localServer;
|
||||
QPointer<QLocalSocket> m_firstSocket;
|
||||
QPointer<QLocalSocket> m_secondSocket;
|
||||
QPointer<QLocalSocket> m_thirdSocket;
|
||||
QPointer<NodeInstanceView> m_nodeInstanceView;
|
||||
QPointer<QProcess> m_qmlPuppetEditorProcess;
|
||||
QPointer<QProcess> m_qmlPuppetPreviewProcess;
|
||||
QPointer<QProcess> m_qmlPuppetRenderProcess;
|
||||
quint32 m_firstBlockSize;
|
||||
quint32 m_secondBlockSize;
|
||||
quint32 m_thirdBlockSize;
|
||||
|
||||
@@ -53,10 +53,6 @@ class MetaInfoPrivate
|
||||
{
|
||||
Q_DISABLE_COPY(MetaInfoPrivate)
|
||||
public:
|
||||
typedef QSharedPointer<MetaInfoPrivate> Pointer;
|
||||
typedef QWeakPointer<MetaInfoPrivate> WeakPointer;
|
||||
|
||||
|
||||
MetaInfoPrivate(MetaInfo *q);
|
||||
void clear();
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#include "invalidpropertyexception.h"
|
||||
#include "invalidargumentexception.h"
|
||||
|
||||
#include <QWeakPointer>
|
||||
#include <QPointer>
|
||||
|
||||
#include <QHashIterator>
|
||||
|
||||
@@ -94,7 +94,7 @@ ModelPrivate::~ModelPrivate()
|
||||
|
||||
void ModelPrivate::detachAllViews()
|
||||
{
|
||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList)
|
||||
foreach (const QPointer<AbstractView> &view, m_viewList)
|
||||
detachView(view.data(), true);
|
||||
|
||||
m_viewList.clear();
|
||||
@@ -162,7 +162,7 @@ void ModelPrivate::notifyImportsChanged(const QList<Import> &addedImports, const
|
||||
if (nodeInstanceView())
|
||||
nodeInstanceView()->importsChanged(addedImports, removedImports);
|
||||
|
||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList)
|
||||
foreach (const QPointer<AbstractView> &view, m_viewList)
|
||||
view->importsChanged(addedImports, removedImports);
|
||||
|
||||
if (resetModel)
|
||||
@@ -181,7 +181,7 @@ void ModelPrivate::setFileUrl(const QUrl &fileUrl)
|
||||
if (oldPath != fileUrl) {
|
||||
m_fileUrl = fileUrl;
|
||||
|
||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList)
|
||||
foreach (const QPointer<AbstractView> &view, m_viewList)
|
||||
view->fileUrlChanged(oldPath, fileUrl);
|
||||
}
|
||||
}
|
||||
@@ -337,7 +337,7 @@ void ModelPrivate::notifyAuxiliaryDataChanged(const InternalNodePointer &interna
|
||||
resetModel = true;
|
||||
}
|
||||
|
||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList) {
|
||||
foreach (const QPointer<AbstractView> &view, m_viewList) {
|
||||
Q_ASSERT(view != 0);
|
||||
ModelNode node(internalNode, model(), view.data());
|
||||
view->auxiliaryDataChanged(node, name, data);
|
||||
@@ -368,7 +368,7 @@ void ModelPrivate::notifyNodeSourceChanged(const InternalNodePointer &internalNo
|
||||
resetModel = true;
|
||||
}
|
||||
|
||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList) {
|
||||
foreach (const QPointer<AbstractView> &view, m_viewList) {
|
||||
Q_ASSERT(view != 0);
|
||||
ModelNode node(internalNode, model(), view.data());
|
||||
view->nodeSourceChanged(node, newNodeSource);
|
||||
@@ -400,7 +400,7 @@ void ModelPrivate::notifyRootNodeTypeChanged(const QString &type, int majorVersi
|
||||
if (nodeInstanceView())
|
||||
nodeInstanceView()->rootNodeTypeChanged(type, majorVersion, minorVersion);
|
||||
|
||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList) {
|
||||
foreach (const QPointer<AbstractView> &view, m_viewList) {
|
||||
Q_ASSERT(view != 0);
|
||||
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
|
||||
|
||||
typedef QPair<ModelNode, PropertyName> ModelNodePropertyPair;
|
||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList) {
|
||||
foreach (const QPointer<AbstractView> &view, m_viewList) {
|
||||
Q_ASSERT(view != 0);
|
||||
|
||||
QList<QPair<ModelNode, PropertyName> > adaptedPropertyList;
|
||||
@@ -443,7 +443,7 @@ void ModelPrivate::notifyInstancesCompleted(const QVector<ModelNode> &nodeVector
|
||||
resetModel = true;
|
||||
}
|
||||
|
||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList) {
|
||||
foreach (const QPointer<AbstractView> &view, m_viewList) {
|
||||
Q_ASSERT(view != 0);
|
||||
view->instancesCompleted(toModelNodeVector(internalVector, view.data()));
|
||||
}
|
||||
@@ -481,7 +481,7 @@ void ModelPrivate::notifyInstancesInformationsChange(const QMultiHash<ModelNode,
|
||||
resetModel = true;
|
||||
}
|
||||
|
||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList) {
|
||||
foreach (const QPointer<AbstractView> &view, m_viewList) {
|
||||
Q_ASSERT(view != 0);
|
||||
view->instanceInformationsChange(convertModelNodeInformationHash(informationChangeHash, view.data()));
|
||||
}
|
||||
@@ -508,7 +508,7 @@ void ModelPrivate::notifyInstancesRenderImageChanged(const QVector<ModelNode> &n
|
||||
resetModel = true;
|
||||
}
|
||||
|
||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList) {
|
||||
foreach (const QPointer<AbstractView> &view, m_viewList) {
|
||||
Q_ASSERT(view != 0);
|
||||
view->instancesRenderImageChanged(toModelNodeVector(internalVector, view.data()));
|
||||
}
|
||||
@@ -535,7 +535,7 @@ void ModelPrivate::notifyInstancesPreviewImageChanged(const QVector<ModelNode> &
|
||||
resetModel = true;
|
||||
}
|
||||
|
||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList) {
|
||||
foreach (const QPointer<AbstractView> &view, m_viewList) {
|
||||
Q_ASSERT(view != 0);
|
||||
view->instancesPreviewImageChanged(toModelNodeVector(internalVector, view.data()));
|
||||
}
|
||||
@@ -562,7 +562,7 @@ void ModelPrivate::notifyInstancesChildrenChanged(const QVector<ModelNode> &node
|
||||
resetModel = true;
|
||||
}
|
||||
|
||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList) {
|
||||
foreach (const QPointer<AbstractView> &view, m_viewList) {
|
||||
Q_ASSERT(view != 0);
|
||||
view->instancesChildrenChanged(toModelNodeVector(internalVector, view.data()));
|
||||
}
|
||||
@@ -589,7 +589,7 @@ void ModelPrivate::notifyCurrentStateChanged(const ModelNode &node)
|
||||
resetModel = true;
|
||||
}
|
||||
|
||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList) {
|
||||
foreach (const QPointer<AbstractView> &view, m_viewList) {
|
||||
Q_ASSERT(view != 0);
|
||||
view->currentStateChanged(ModelNode(node.internalNode(), model(), view.data()));
|
||||
}
|
||||
@@ -614,7 +614,7 @@ void ModelPrivate::notifyRewriterBeginTransaction()
|
||||
resetModel = true;
|
||||
}
|
||||
|
||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList) {
|
||||
foreach (const QPointer<AbstractView> &view, m_viewList) {
|
||||
Q_ASSERT(view != 0);
|
||||
view->rewriterBeginTransaction();
|
||||
}
|
||||
@@ -639,7 +639,7 @@ void ModelPrivate::notifyRewriterEndTransaction()
|
||||
resetModel = true;
|
||||
}
|
||||
|
||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList) {
|
||||
foreach (const QPointer<AbstractView> &view, m_viewList) {
|
||||
Q_ASSERT(view != 0);
|
||||
view->rewriterEndTransaction();
|
||||
}
|
||||
@@ -667,7 +667,7 @@ void ModelPrivate::notifyInstanceToken(const QString &token, int number, const Q
|
||||
resetModel = true;
|
||||
}
|
||||
|
||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList) {
|
||||
foreach (const QPointer<AbstractView> &view, m_viewList) {
|
||||
Q_ASSERT(view != 0);
|
||||
view->instancesToken(token, number, toModelNodeVector(internalVector, view.data()));
|
||||
}
|
||||
@@ -694,7 +694,7 @@ void ModelPrivate::notifyCustomNotification(const AbstractView *senderView, cons
|
||||
resetModel = true;
|
||||
}
|
||||
|
||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList) {
|
||||
foreach (const QPointer<AbstractView> &view, m_viewList) {
|
||||
Q_ASSERT(view != 0);
|
||||
view->customNotification(senderView, identifier, toModelNodeList(internalList, view.data()), data);
|
||||
}
|
||||
@@ -737,7 +737,7 @@ void ModelPrivate::notifyPropertiesRemoved(const QList<PropertyPair> &propertyPa
|
||||
nodeInstanceView()->propertiesRemoved(propertyList);
|
||||
}
|
||||
|
||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList) {
|
||||
foreach (const QPointer<AbstractView> &view, m_viewList) {
|
||||
QList<AbstractProperty> propertyList;
|
||||
Q_ASSERT(view != 0);
|
||||
foreach (const PropertyPair &propertyPair, propertyPairList) {
|
||||
@@ -772,7 +772,7 @@ void ModelPrivate::notifyPropertiesAboutToBeRemoved(const QList<InternalProperty
|
||||
resetModel = true;
|
||||
}
|
||||
|
||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList) {
|
||||
foreach (const QPointer<AbstractView> &view, m_viewList) {
|
||||
QList<AbstractProperty> propertyList;
|
||||
Q_ASSERT(view != 0);
|
||||
foreach (const InternalProperty::Pointer &property, internalPropertyList) {
|
||||
@@ -861,7 +861,7 @@ void ModelPrivate::notifyNodeCreated(const InternalNode::Pointer &newInternalNod
|
||||
nodeInstanceView()->nodeCreated(createdNode);
|
||||
}
|
||||
|
||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList) {
|
||||
foreach (const QPointer<AbstractView> &view, m_viewList) {
|
||||
Q_ASSERT(view != 0);
|
||||
ModelNode createdNode(newInternalNodePointer, model(), view.data());
|
||||
view->nodeCreated(createdNode);
|
||||
@@ -886,7 +886,7 @@ void ModelPrivate::notifyNodeAboutToBeRemoved(const InternalNode::Pointer &inter
|
||||
resetModel = true;
|
||||
}
|
||||
|
||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList) {
|
||||
foreach (const QPointer<AbstractView> &view, m_viewList) {
|
||||
Q_ASSERT(view != 0);
|
||||
ModelNode modelNode(internalNodePointer, model(), view.data());
|
||||
view->nodeAboutToBeRemoved(modelNode);
|
||||
@@ -926,7 +926,7 @@ void ModelPrivate::notifyNodeRemoved(const InternalNodePointer &internalNodePoin
|
||||
nodeInstanceView()->nodeRemoved(modelNode, parentProperty, propertyChange);
|
||||
}
|
||||
|
||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList) {
|
||||
foreach (const QPointer<AbstractView> &view, m_viewList) {
|
||||
Q_ASSERT(view != 0);
|
||||
ModelNode modelNode(internalNodePointer, model(), view.data());
|
||||
NodeAbstractProperty parentProperty(parentPropertyName, parentNodePointer, model(), view.data());
|
||||
@@ -953,7 +953,7 @@ void ModelPrivate::notifyNodeIdChanged(const InternalNode::Pointer& internalNode
|
||||
resetModel = true;
|
||||
}
|
||||
|
||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList) {
|
||||
foreach (const QPointer<AbstractView> &view, m_viewList) {
|
||||
Q_ASSERT(view != 0);
|
||||
ModelNode modelNode(internalNodePointer, model(), view.data());
|
||||
view->nodeIdChanged(modelNode, newId, oldId);
|
||||
@@ -987,7 +987,7 @@ void ModelPrivate::notifyBindingPropertiesChanged(const QList<InternalBindingPro
|
||||
resetModel = true;
|
||||
}
|
||||
|
||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList) {
|
||||
foreach (const QPointer<AbstractView> &view, m_viewList) {
|
||||
Q_ASSERT(view != 0);
|
||||
QList<BindingProperty> propertyList;
|
||||
foreach (const InternalBindingPropertyPointer &bindingProperty, internalPropertyList) {
|
||||
@@ -1028,7 +1028,7 @@ void ModelPrivate::notifySignalHandlerPropertiesChanged(const QVector<InternalSi
|
||||
resetModel = true;
|
||||
}
|
||||
|
||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList) {
|
||||
foreach (const QPointer<AbstractView> &view, m_viewList) {
|
||||
Q_ASSERT(view != 0);
|
||||
QVector<SignalHandlerProperty> propertyList;
|
||||
foreach (const InternalSignalHandlerPropertyPointer &signalHandlerProperty, internalPropertyList) {
|
||||
@@ -1070,7 +1070,7 @@ void ModelPrivate::notifyScriptFunctionsChanged(const InternalNodePointer &inter
|
||||
nodeInstanceView()->scriptFunctionsChanged(node, scriptFunctionList);
|
||||
}
|
||||
|
||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList) {
|
||||
foreach (const QPointer<AbstractView> &view, m_viewList) {
|
||||
Q_ASSERT(view != 0);
|
||||
|
||||
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;
|
||||
Q_ASSERT(view != 0);
|
||||
foreach (const PropertyName &propertyName, propertyNameList) {
|
||||
@@ -1163,7 +1163,7 @@ void ModelPrivate::notifyNodeAboutToBeReparent(const InternalNodePointer &intern
|
||||
resetModel = true;
|
||||
}
|
||||
|
||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList) {
|
||||
foreach (const QPointer<AbstractView> &view, m_viewList) {
|
||||
NodeAbstractProperty newProperty;
|
||||
NodeAbstractProperty oldProperty;
|
||||
|
||||
@@ -1224,7 +1224,7 @@ void ModelPrivate::notifyNodeReparent(const InternalNode::Pointer &internalNodeP
|
||||
resetModel = true;
|
||||
}
|
||||
|
||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList) {
|
||||
foreach (const QPointer<AbstractView> &view, m_viewList) {
|
||||
NodeAbstractProperty newProperty;
|
||||
NodeAbstractProperty oldProperty;
|
||||
|
||||
@@ -1274,7 +1274,7 @@ void ModelPrivate::notifyNodeOrderChanged(const InternalNodeListPropertyPointer
|
||||
resetModel = true;
|
||||
}
|
||||
|
||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList) {
|
||||
foreach (const QPointer<AbstractView> &view, m_viewList) {
|
||||
Q_ASSERT(!view.isNull());
|
||||
view->nodeOrderChanged(NodeListProperty(internalListPropertyPointer, 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,
|
||||
const QList<InternalNode::Pointer> &oldSelectedNodeList)
|
||||
{
|
||||
foreach (const QWeakPointer<AbstractView> &view, m_viewList) {
|
||||
foreach (const QPointer<AbstractView> &view, m_viewList) {
|
||||
Q_ASSERT(view != 0);
|
||||
view->selectedNodesChanged(toModelNodeList(newSelectedNodeList, view.data()), toModelNodeList(oldSelectedNodeList, view.data()));
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#define MODEL_P_H
|
||||
|
||||
#include <QList>
|
||||
#include <QWeakPointer>
|
||||
#include <QPointer>
|
||||
#include <QSet>
|
||||
#include <QUrl>
|
||||
|
||||
@@ -80,7 +80,7 @@ public:
|
||||
WriteLocker(ModelPrivate *model);
|
||||
WriteLocker(Model *model);
|
||||
private: // variables
|
||||
QWeakPointer<ModelPrivate> m_model;
|
||||
QPointer<ModelPrivate> m_model;
|
||||
};
|
||||
|
||||
class ModelPrivate : public QObject {
|
||||
@@ -239,7 +239,7 @@ private:
|
||||
QList<Import> m_imports;
|
||||
QList<Import> m_possibleImportList;
|
||||
QList<Import> m_usedImportList;
|
||||
QList<QWeakPointer<AbstractView> > m_viewList;
|
||||
QList<QPointer<AbstractView> > m_viewList;
|
||||
QList<InternalNodePointer> m_selectedInternalNodeList;
|
||||
QHash<QString,InternalNodePointer> m_idNodeHash;
|
||||
QHash<qint32, InternalNodePointer> m_internalIdNodeHash;
|
||||
@@ -247,10 +247,10 @@ private:
|
||||
InternalNodePointer m_currentStateNode;
|
||||
InternalNodePointer m_rootInternalNode;
|
||||
QUrl m_fileUrl;
|
||||
QWeakPointer<RewriterView> m_rewriterView;
|
||||
QWeakPointer<NodeInstanceView> m_nodeInstanceView;
|
||||
QWeakPointer<TextModifier> m_textModifier;
|
||||
QWeakPointer<Model> m_metaInfoProxyModel;
|
||||
QPointer<RewriterView> m_rewriterView;
|
||||
QPointer<NodeInstanceView> m_nodeInstanceView;
|
||||
QPointer<TextModifier> m_textModifier;
|
||||
QPointer<Model> m_metaInfoProxyModel;
|
||||
bool m_writeLock;
|
||||
qint32 m_internalIdCounter;
|
||||
};
|
||||
|
||||
@@ -35,7 +35,7 @@ public:
|
||||
NodeInstanceView nodeInstanceView;
|
||||
DesignerActionManagerView designerActionManagerView;
|
||||
|
||||
QList<QWeakPointer<AbstractView> > additionalViews;
|
||||
QList<QPointer<AbstractView> > additionalViews;
|
||||
};
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ ViewManager::ViewManager()
|
||||
|
||||
ViewManager::~ViewManager()
|
||||
{
|
||||
foreach (const QWeakPointer<AbstractView> &view, d->additionalViews)
|
||||
foreach (const QPointer<AbstractView> &view, d->additionalViews)
|
||||
delete view.data();
|
||||
|
||||
delete d;
|
||||
@@ -137,13 +137,13 @@ void ViewManager::attachItemLibraryView()
|
||||
|
||||
void ViewManager::attachAdditionalViews()
|
||||
{
|
||||
foreach (const QWeakPointer<AbstractView> &view, d->additionalViews)
|
||||
foreach (const QPointer<AbstractView> &view, d->additionalViews)
|
||||
currentModel()->attachView(view.data());
|
||||
}
|
||||
|
||||
void ViewManager::detachAdditionalViews()
|
||||
{
|
||||
foreach (const QWeakPointer<AbstractView> &view, d->additionalViews)
|
||||
foreach (const QPointer<AbstractView> &view, d->additionalViews)
|
||||
currentModel()->detachView(view.data());
|
||||
}
|
||||
|
||||
@@ -215,7 +215,7 @@ QList<WidgetInfo> ViewManager::widgetInfos()
|
||||
if (d->debugView.hasWidget())
|
||||
widgetInfoList.append(d->debugView.widgetInfo());
|
||||
|
||||
foreach (const QWeakPointer<AbstractView> &abstractView, d->additionalViews) {
|
||||
foreach (const QPointer<AbstractView> &abstractView, d->additionalViews) {
|
||||
if (abstractView && abstractView->hasWidget())
|
||||
widgetInfoList.append(abstractView->widgetInfo());
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#define WIDGETPLUGINPATH_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QWeakPointer>
|
||||
#include <QPointer>
|
||||
#include <QList>
|
||||
#include <QDir>
|
||||
#include <QStandardItem>
|
||||
@@ -48,8 +48,8 @@ namespace Internal {
|
||||
|
||||
|
||||
// Dumb plugin data structure. Note that whereas QObjects can
|
||||
// casted to an interface, QWeakPointer does not work with the
|
||||
// interface class, so, we need a separate QWeakPointer as a guard
|
||||
// casted to an interface, QPointer does not work with the
|
||||
// interface class, so, we need a separate QPointer as a guard
|
||||
// to detect the deletion of a plugin instance which can happen
|
||||
// in theory.
|
||||
struct WidgetPluginData {
|
||||
@@ -58,7 +58,7 @@ struct WidgetPluginData {
|
||||
QString path;
|
||||
bool failed;
|
||||
QString errorMessage;
|
||||
QWeakPointer<QObject> instanceGuard;
|
||||
QPointer<QObject> instanceGuard;
|
||||
IWidgetPlugin *instance;
|
||||
};
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
#include <qmldesignercorelib_global.h>
|
||||
|
||||
#include <QWeakPointer>
|
||||
#include <QPointer>
|
||||
|
||||
namespace QmlDesigner {
|
||||
|
||||
@@ -54,7 +54,7 @@ public:
|
||||
protected:
|
||||
AbstractView *view();
|
||||
private:
|
||||
QWeakPointer<AbstractView> m_view;
|
||||
QPointer<AbstractView> m_view;
|
||||
QByteArray m_identifier;
|
||||
mutable bool m_valid;
|
||||
int m_identifierNumber;
|
||||
|
||||
@@ -171,7 +171,7 @@ DocumentManager::DocumentManager()
|
||||
|
||||
DocumentManager::~DocumentManager()
|
||||
{
|
||||
foreach (const QWeakPointer<DesignDocument> &designDocument, m_designDocumentHash)
|
||||
foreach (const QPointer<DesignDocument> &designDocument, m_designDocumentHash)
|
||||
delete designDocument.data();
|
||||
}
|
||||
|
||||
|
||||
@@ -56,8 +56,8 @@ public:
|
||||
static void goIntoComponent(const ModelNode &modelNode);
|
||||
|
||||
private:
|
||||
QHash<Core::IEditor *,QWeakPointer<DesignDocument> > m_designDocumentHash;
|
||||
QWeakPointer<DesignDocument> m_currentDesignDocument;
|
||||
QHash<Core::IEditor *,QPointer<DesignDocument> > m_designDocumentHash;
|
||||
QPointer<DesignDocument> m_currentDesignDocument;
|
||||
};
|
||||
|
||||
} // namespace QmlDesigner
|
||||
|
||||
Reference in New Issue
Block a user