forked from qt-creator/qt-creator
		
	CppTools: Tests: Fix memory leak
Detected by leak detector of Address Sanitizer. Change-Id: I2aae2ba6fa2f218c9754d912dce7c398b1b384cb Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
		| @@ -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()); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user