QmlDesigner: Reset error messages wehen restarting puppet

We store generic error messages in the root node.
Those have to be reset.
Also we have to reset the type icon if there is no error anymore.

Change-Id: Ibe6274f651113f26aef6240bb9efa005862378f4
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Thomas Hartmann
2017-04-03 15:39:07 +02:00
parent f23e454370
commit 180653128f
2 changed files with 5 additions and 0 deletions

View File

@@ -380,6 +380,7 @@ void NavigatorTreeModel::updateItemRow(const ModelNode &modelNode, ItemRow items
items.idItem->setToolTip(QString::fromUtf8(modelNode.type()));
else
items.idItem->setToolTip(msgUnknownItem(QString::fromUtf8(modelNode.type())));
items.idItem->setIcon(getTypeIcon(modelNode));
}
blockItemChangedSignal(blockSignal);

View File

@@ -199,6 +199,10 @@ void NodeInstanceView::handleCrash()
void NodeInstanceView::restartProcess()
{
if (rootNodeInstance().isValid())
rootNodeInstance().setError({});
emitInstanceErrorChange({});
if (m_restartProcessTimerId)
killTimer(m_restartProcessTimerId);