Commit 6c848f1b authored by Marco Bubke's avatar Marco Bubke
Browse files

QmlDesigner: Derive DesignerActionManagerView from AbstractView



Change-Id: Ia0139b51d603fc0f41a3f58f557eab3a77817f98
Reviewed-by: default avatarTim Jenssen <tim.jenssen@digia.com>
parent 6fdd0e27
......@@ -49,21 +49,21 @@ static inline bool contains(const QmlItemNode &node, const QPoint &position)
namespace Internal {
class DesignerActionManagerView : public QmlModelView
class DesignerActionManagerView : public AbstractView
{
public:
DesignerActionManagerView() : QmlModelView(0), m_isInRewriterTransaction(false), m_setupContextDirty(false)
DesignerActionManagerView() : AbstractView(0), m_isInRewriterTransaction(false), m_setupContextDirty(false)
{}
void modelAttached(Model *model) QTC_OVERRIDE
{
QmlModelView::modelAttached(model);
AbstractView::modelAttached(model);
setupContext();
}
void modelAboutToBeDetached(Model *model) QTC_OVERRIDE
{
QmlModelView::modelAboutToBeDetached(model);
AbstractView::modelAboutToBeDetached(model);
setupContext();
}
......@@ -183,6 +183,11 @@ public:
m_designerActionList = designerActionList;
}
void signalHandlerPropertiesChanged(const QVector<SignalHandlerProperty> &/*propertyList*/, PropertyChangeFlags /*propertyChange*/)
{
setupContext();
}
protected:
void setupContext()
{
......@@ -216,7 +221,7 @@ QList<AbstractDesignerAction* > DesignerActionManager::designerActions()
return instance()->factoriesInternal();
}
QmlModelView *DesignerActionManager::view()
AbstractView *DesignerActionManager::view()
{
return instance()->m_view;
}
......
......@@ -46,7 +46,7 @@ public:
static QList<AbstractDesignerAction* > designerActions();
static void createDefaultDesignerActions();
static QmlModelView *view();
static AbstractView *view();
protected:
static DesignerActionManager *instance();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment