diff --git a/src/plugins/qmldesigner/components/formeditor/dragtool.cpp b/src/plugins/qmldesigner/components/formeditor/dragtool.cpp index f2c28ebd986..ae6892cf3f8 100644 --- a/src/plugins/qmldesigner/components/formeditor/dragtool.cpp +++ b/src/plugins/qmldesigner/components/formeditor/dragtool.cpp @@ -42,19 +42,11 @@ namespace QmlDesigner { -namespace Internal { -void TimerHandler::clearMoveDelay() -{ - m_dragTool->clearMoveDelay(); -} - -} DragTool::DragTool(FormEditorView *editorView) : AbstractFormEditorTool(editorView), m_moveManipulator(editorView->scene()->manipulatorLayerItem(), editorView), m_selectionIndicator(editorView->scene()->manipulatorLayerItem()), - m_timerHandler(new Internal::TimerHandler(this)), m_blockMove(false), m_isAborted(false) { @@ -327,7 +319,6 @@ void DragTool::createDragNode(const QMimeData *mimeData, const QPointF &scenePos m_blockMove = true; m_startPoint = scenePosition; - QTimer::singleShot(10000, m_timerHandler.data(), SLOT(clearMoveDelay())); } } } diff --git a/src/plugins/qmldesigner/components/formeditor/dragtool.h b/src/plugins/qmldesigner/components/formeditor/dragtool.h index eeadda6a911..11ef56f04a9 100644 --- a/src/plugins/qmldesigner/components/formeditor/dragtool.h +++ b/src/plugins/qmldesigner/components/formeditor/dragtool.h @@ -42,22 +42,6 @@ namespace QmlDesigner { class DragTool; -namespace Internal { - -class TimerHandler : public QObject -{ - Q_OBJECT - -public: - TimerHandler(DragTool *tool) : QObject(), m_dragTool(tool) {} -public slots: - void clearMoveDelay(); - -private: - DragTool *m_dragTool; -}; -} - class DragTool : public AbstractFormEditorTool { public: @@ -116,7 +100,6 @@ private: QPointer m_movingItem; RewriterTransaction m_rewriterTransaction; QmlItemNode m_dragNode; - QScopedPointer m_timerHandler; bool m_blockMove; QPointF m_startPoint; bool m_isAborted; diff --git a/src/plugins/qmldesigner/components/formeditor/formeditorview.cpp b/src/plugins/qmldesigner/components/formeditor/formeditorview.cpp index ef1fe84c97c..3780005779f 100644 --- a/src/plugins/qmldesigner/components/formeditor/formeditorview.cpp +++ b/src/plugins/qmldesigner/components/formeditor/formeditorview.cpp @@ -299,6 +299,12 @@ void FormEditorView::propertiesRemoved(const QList &/*property { } +void FormEditorView::customNotification(const AbstractView */*view*/, const QString &identifier, const QList &/*nodeList*/, const QList &/*data*/) +{ + if (identifier == QStringLiteral("puppet crashed")) + m_dragTool->clearMoveDelay(); +} + AbstractFormEditorTool* FormEditorView::currentTool() const { return m_currentTool; diff --git a/src/plugins/qmldesigner/components/formeditor/formeditorview.h b/src/plugins/qmldesigner/components/formeditor/formeditorview.h index 6333d71bdae..fc0d9c9f78f 100644 --- a/src/plugins/qmldesigner/components/formeditor/formeditorview.h +++ b/src/plugins/qmldesigner/components/formeditor/formeditorview.h @@ -84,6 +84,8 @@ public: void scriptFunctionsChanged(const ModelNode &node, const QStringList &scriptFunctionList) QTC_OVERRIDE; void propertiesRemoved(const QList &propertyList) QTC_OVERRIDE; + void customNotification(const AbstractView *view, const QString &identifier, const QList &nodeList, const QList &data) QTC_OVERRIDE; + // FormEditorView WidgetInfo widgetInfo() QTC_OVERRIDE; diff --git a/src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp b/src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp index 0f089750314..845de2ac87c 100644 --- a/src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp +++ b/src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp @@ -188,6 +188,8 @@ void NodeInstanceView::handleChrash() restartProcess(); else emit qmlPuppetCrashed(); + + emitCustomNotification(QStringLiteral("puppet crashed")); }