Commit 662df29e authored by Marco Bubke's avatar Marco Bubke

QmlDesigner: Fix remove imports in the Rewriter

The import should be removed and not the import list.

Change-Id: I6d9017141ea9c0d5885ed6d3dc3d227c2fe7b2f4
Reviewed-by: default avatarThomas Hartmann <>
parent b488d975
......@@ -79,8 +79,8 @@ bool ChangeImportsVisitor::remove(QmlJS::AST::UiProgram *ast, const Import &impo
for (UiImportList *iter = ast->imports; iter; iter = iter->next) {
if (equals(iter->import, import)) {
int start = iter->firstSourceLocation().begin();
int end = iter->lastSourceLocation().end();
int start = iter->import->firstSourceLocation().begin();
int end = iter->import->lastSourceLocation().end();
includeSurroundingWhitespace(start, end);
replace(start, end - start, QString());
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