forked from qt-creator/qt-creator
QmlDesigner.nodeInstances: show warning if qml pupped crashes
If the qml puppetcrahes 3 times in a row we show a warning. Reviewed-by: Marco Bubke
This commit is contained in:
@@ -138,6 +138,9 @@ public:
|
|||||||
|
|
||||||
QImage statePreviewImage(const ModelNode &stateNode) const;
|
QImage statePreviewImage(const ModelNode &stateNode) const;
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void qmlPuppetCrashed();
|
||||||
|
|
||||||
private: // functions
|
private: // functions
|
||||||
NodeInstance rootNodeInstance() const;
|
NodeInstance rootNodeInstance() const;
|
||||||
|
|
||||||
|
@@ -180,7 +180,7 @@ void NodeInstanceView::handleChrash()
|
|||||||
if (elaspsedTimeSinceLastCrash > 2000) {
|
if (elaspsedTimeSinceLastCrash > 2000) {
|
||||||
restartProcess();
|
restartProcess();
|
||||||
} else {
|
} else {
|
||||||
emitCustomNotification("QmlPuppet crashed");
|
emit qmlPuppetCrashed();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -648,6 +648,7 @@ void DesignModeWidget::setup()
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_nodeInstanceView = new NodeInstanceView(this);
|
m_nodeInstanceView = new NodeInstanceView(this);
|
||||||
|
connect(m_nodeInstanceView.data(), SIGNAL(qmlPuppetCrashed()), this, SLOT(qmlPuppetCrashed()));
|
||||||
// Sidebar takes ownership
|
// Sidebar takes ownership
|
||||||
m_navigator = new NavigatorView;
|
m_navigator = new NavigatorView;
|
||||||
m_allPropertiesBox = new AllPropertiesBox;
|
m_allPropertiesBox = new AllPropertiesBox;
|
||||||
@@ -773,6 +774,14 @@ void DesignModeWidget::deleteSidebarWidgets()
|
|||||||
m_rightSideBar = 0;
|
m_rightSideBar = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DesignModeWidget::qmlPuppetCrashed()
|
||||||
|
{
|
||||||
|
QList<RewriterView::Error> errorList;
|
||||||
|
RewriterView::Error error(tr("Qt Quick emulation layer crashed"));
|
||||||
|
errorList << error;
|
||||||
|
disable(errorList);
|
||||||
|
}
|
||||||
|
|
||||||
void DesignModeWidget::resizeEvent(QResizeEvent *event)
|
void DesignModeWidget::resizeEvent(QResizeEvent *event)
|
||||||
{
|
{
|
||||||
if (m_warningWidget)
|
if (m_warningWidget)
|
||||||
|
@@ -154,6 +154,7 @@ private slots:
|
|||||||
void updateAvailableSidebarItemsRight();
|
void updateAvailableSidebarItemsRight();
|
||||||
|
|
||||||
void deleteSidebarWidgets();
|
void deleteSidebarWidgets();
|
||||||
|
void qmlPuppetCrashed();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void resizeEvent(QResizeEvent *event);
|
void resizeEvent(QResizeEvent *event);
|
||||||
|
Reference in New Issue
Block a user