Commit a791ee41 authored by Thomas Hartmann's avatar Thomas Hartmann

QmlDesigner: crash fix

Task-number: QTCREATORBUG-6558
Change-Id: I5e5719c7764df350f4e466b8f1e90bdeed872b3d
Reviewed-by: default avatarEike Ziller <eike.ziller@nokia.com>
Reviewed-by: default avatarAlessandro Portale <alessandro.portale@nokia.com>
parent c344032b
...@@ -187,8 +187,8 @@ public: ...@@ -187,8 +187,8 @@ public:
bool renameId(const QString& oldId, const QString& newId); bool renameId(const QString& oldId, const QString& newId);
const QmlJS::ScopeChain &scopeChain() const;
QmlJS::Document *document() const; QmlJS::Document *document() const;
const QmlJS::ScopeChain *scopeChain() const;
QString convertTypeToImportAlias(const QString &type) const; QString convertTypeToImportAlias(const QString &type) const;
......
...@@ -490,8 +490,8 @@ const QmlJS::ObjectValue *NodeMetaInfoPrivate::getObjectValue() const ...@@ -490,8 +490,8 @@ const QmlJS::ObjectValue *NodeMetaInfoPrivate::getObjectValue() const
QmlJS::ContextPtr NodeMetaInfoPrivate::context() const QmlJS::ContextPtr NodeMetaInfoPrivate::context() const
{ {
if (m_model && m_model->rewriterView()) { if (m_model && m_model->rewriterView() && m_model->rewriterView()->scopeChain()) {
return m_model->rewriterView()->scopeChain().context(); return m_model->rewriterView()->scopeChain()->context();
} }
return QmlJS::ContextPtr(0); return QmlJS::ContextPtr(0);
} }
......
...@@ -624,7 +624,7 @@ bool RewriterView::renameId(const QString& oldId, const QString& newId) ...@@ -624,7 +624,7 @@ bool RewriterView::renameId(const QString& oldId, const QString& newId)
return false; return false;
} }
const QmlJS::ScopeChain &RewriterView::scopeChain() const const QmlJS::ScopeChain *RewriterView::scopeChain() const
{ {
return textToModelMerger()->scopeChain(); return textToModelMerger()->scopeChain();
} }
......
...@@ -68,8 +68,8 @@ public: ...@@ -68,8 +68,8 @@ public:
RewriterView *view() const RewriterView *view() const
{ return m_rewriterView; } { return m_rewriterView; }
const QmlJS::ScopeChain &scopeChain() const const QmlJS::ScopeChain *scopeChain() const
{ return *m_scopeChain; } { return m_scopeChain.data(); }
QmlJS::Document *document() const QmlJS::Document *document() const
{ return m_document.data(); } { return m_document.data(); }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment