From 2717aa5a40b69af376e56565e9fad291318bc994 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann <Thomas.Hartmann@nokia.com> Date: Thu, 23 Sep 2010 15:48:21 +0200 Subject: [PATCH] QmlDesigner.Model: Fix rewriter reset function The rewriter is not anymore in the view list, so the reset function has to be changed. --- src/plugins/qmldesigner/designercore/model/model.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/plugins/qmldesigner/designercore/model/model.cpp b/src/plugins/qmldesigner/designercore/model/model.cpp index 4f046fdd4bf..c320ee8ff30 100644 --- a/src/plugins/qmldesigner/designercore/model/model.cpp +++ b/src/plugins/qmldesigner/designercore/model/model.cpp @@ -532,13 +532,10 @@ void ModelPrivate::setAuxiliaryData(const InternalNode::Pointer& node, const QSt void ModelPrivate::resetModelByRewriter(const QString &description) { - RewriterView* rewriterView = 0; - foreach (const QWeakPointer<AbstractView> &view, m_viewList) { - if (!rewriterView) - rewriterView = qobject_cast<RewriterView*>(view.data()); + if (rewriterView()) { + rewriterView()->resetToLastCorrectQml(); } - Q_ASSERT(rewriterView); - rewriterView->resetToLastCorrectQml(); + throw RewritingException(__LINE__, __FUNCTION__, __FILE__, description, rewriterView->textModifierContent()); } -- GitLab