Commit 0b11ba31 authored by Thomas Hartmann's avatar Thomas Hartmann

QmlDesigner: Keep result in local variable

Change-Id: I43c99bb18c1473b67fc40cda02af6cb1595c29ec
Reviewed-by: default avatarhjk <hjk@qt.io>
parent 50a07695
...@@ -107,23 +107,23 @@ void ViewManager::attachNodeInstanceView() ...@@ -107,23 +107,23 @@ void ViewManager::attachNodeInstanceView()
void ViewManager::attachRewriterView() void ViewManager::attachRewriterView()
{ {
if (currentDesignDocument()->rewriterView()) { if (RewriterView *view = currentDesignDocument()->rewriterView()) {
currentDesignDocument()->rewriterView()->setWidgetStatusCallback([this](bool enable) { view->setWidgetStatusCallback([this](bool enable) {
if (enable) if (enable)
enableWidgets(); enableWidgets();
else else
disableWidgets(); disableWidgets();
}); });
currentModel()->setRewriterView(currentDesignDocument()->rewriterView()); currentModel()->setRewriterView(view);
currentDesignDocument()->rewriterView()->reactivateTextMofifierChangeSignals(); view->reactivateTextMofifierChangeSignals();
} }
} }
void ViewManager::detachRewriterView() void ViewManager::detachRewriterView()
{ {
if (currentDesignDocument()->rewriterView()) { if (RewriterView *view = currentDesignDocument()->rewriterView()) {
currentDesignDocument()->rewriterView()->deactivateTextMofifierChangeSignals(); view->deactivateTextMofifierChangeSignals();
currentModel()->setRewriterView(0); currentModel()->setRewriterView(0);
} }
} }
......
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