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;
|
||||
|
||||
signals:
|
||||
void qmlPuppetCrashed();
|
||||
|
||||
private: // functions
|
||||
NodeInstance rootNodeInstance() const;
|
||||
|
||||
|
@@ -180,7 +180,7 @@ void NodeInstanceView::handleChrash()
|
||||
if (elaspsedTimeSinceLastCrash > 2000) {
|
||||
restartProcess();
|
||||
} else {
|
||||
emitCustomNotification("QmlPuppet crashed");
|
||||
emit qmlPuppetCrashed();
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -648,6 +648,7 @@ void DesignModeWidget::setup()
|
||||
}
|
||||
|
||||
m_nodeInstanceView = new NodeInstanceView(this);
|
||||
connect(m_nodeInstanceView.data(), SIGNAL(qmlPuppetCrashed()), this, SLOT(qmlPuppetCrashed()));
|
||||
// Sidebar takes ownership
|
||||
m_navigator = new NavigatorView;
|
||||
m_allPropertiesBox = new AllPropertiesBox;
|
||||
@@ -773,6 +774,14 @@ void DesignModeWidget::deleteSidebarWidgets()
|
||||
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)
|
||||
{
|
||||
if (m_warningWidget)
|
||||
|
@@ -154,6 +154,7 @@ private slots:
|
||||
void updateAvailableSidebarItemsRight();
|
||||
|
||||
void deleteSidebarWidgets();
|
||||
void qmlPuppetCrashed();
|
||||
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent *event);
|
||||
|
Reference in New Issue
Block a user