Commit cf66beff authored by Nikolai Kosjar's avatar Nikolai Kosjar
Browse files

CppTools: Tests: Fix memory leak



Detected by leak detector of Address Sanitizer.

Change-Id: I2aae2ba6fa2f218c9754d912dce7c398b1b384cb
Reviewed-by: default avatarOrgad Shaneh <orgads@gmail.com>
parent df582f88
......@@ -108,7 +108,8 @@ public:
QVERIFY(ast);
// Open file
TextEditor::BaseTextEditor *editor = TextEditor::PlainTextEditorFactory::createPlainTextEditor();
QScopedPointer<TextEditor::BaseTextEditor> editor(
TextEditor::PlainTextEditorFactory::createPlainTextEditor());
QString error;
editor->open(&error, document->fileName(), document->fileName());
QVERIFY(error.isEmpty());
......
Supports Markdown
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