forked from qt-creator/qt-creator
QmlDesigner: Fix mode switch crash
Task-number: QDS-8599 Change-Id: I4bebd2ff4f2ce93788743304ff335d118e23ce68 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
committed by
Henning Gründl
parent
bf4a94d619
commit
8b1233c11e
@@ -136,6 +136,7 @@ NodeInstanceView::NodeInstanceView(ConnectionManagerInterface &connectionManager
|
|||||||
m_resetTimer.setSingleShot(true);
|
m_resetTimer.setSingleShot(true);
|
||||||
m_resetTimer.setInterval(100);
|
m_resetTimer.setInterval(100);
|
||||||
QObject::connect(&m_resetTimer, &QTimer::timeout, [this] {
|
QObject::connect(&m_resetTimer, &QTimer::timeout, [this] {
|
||||||
|
if (isAttached())
|
||||||
resetPuppet();
|
resetPuppet();
|
||||||
});
|
});
|
||||||
m_updateWatcherTimer.setSingleShot(true);
|
m_updateWatcherTimer.setSingleShot(true);
|
||||||
|
@@ -559,6 +559,7 @@ void AbstractView::resetView()
|
|||||||
|
|
||||||
void AbstractView::resetPuppet()
|
void AbstractView::resetPuppet()
|
||||||
{
|
{
|
||||||
|
QTC_ASSERT(isAttached(), return);
|
||||||
emitCustomNotification(QStringLiteral("reset QmlPuppet"));
|
emitCustomNotification(QStringLiteral("reset QmlPuppet"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -689,6 +690,7 @@ void AbstractView::emitCustomNotification(const QString &identifier, const QList
|
|||||||
|
|
||||||
void AbstractView::emitCustomNotification(const QString &identifier, const QList<ModelNode> &nodeList, const QList<QVariant> &data)
|
void AbstractView::emitCustomNotification(const QString &identifier, const QList<ModelNode> &nodeList, const QList<QVariant> &data)
|
||||||
{
|
{
|
||||||
|
if (model())
|
||||||
model()->d->notifyCustomNotification(this, identifier, nodeList, data);
|
model()->d->notifyCustomNotification(this, identifier, nodeList, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user