Commit a5d25eab authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner.Rewriter: fixing return value of applyChanges()

sucess should be false if refactoring.reparseDocument() fails

Reviewed-by: Erik Verbruggen
parent b08882a7
......@@ -228,7 +228,7 @@ bool ModelToTextMerger::applyChanges()
for (int i = 0; i < m_rewriteActions.size(); ++i) {
if (i != 0) {
textModifier->flushGroup();
refactoring.reparseDocument();
success = refactoring.reparseDocument();
}
RewriteAction* action = m_rewriteActions.at(i);
......@@ -237,7 +237,8 @@ bool ModelToTextMerger::applyChanges()
}
ModelNodePositionStorage *positionStore = m_rewriterView->positionStorage();
success = action->execute(refactoring, *positionStore);
if (success)
success = action->execute(refactoring, *positionStore);
if (!success /*&& DebugRewriteActions*/) {
qDebug() << "*** QML source code: ***";
......
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