forked from qt-creator/qt-creator
CppTools: Tests: Fix leaking IAssistProposal and SymbolSearcher
Change-Id: Ic81a5df88d17375cf0087213d84443845bfd38cc Reviewed-by: Christian Stenger <christian.stenger@digia.com>
This commit is contained in:
@@ -31,6 +31,8 @@
|
||||
|
||||
#include <coreplugin/editormanager/editormanager.h>
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/codeassist/iassistproposal.h>
|
||||
#include <texteditor/codeassist/iassistproposalmodel.h>
|
||||
|
||||
#include <cplusplus/CppDocument.h>
|
||||
#include <utils/fileutils.h>
|
||||
@@ -212,5 +214,15 @@ FileWriterAndRemover::~FileWriterAndRemover()
|
||||
}
|
||||
}
|
||||
|
||||
IAssistProposalScopedPointer::IAssistProposalScopedPointer(TextEditor::IAssistProposal *proposal)
|
||||
: d(proposal)
|
||||
{}
|
||||
|
||||
IAssistProposalScopedPointer::~IAssistProposalScopedPointer()
|
||||
{
|
||||
if (d && d->model())
|
||||
delete d->model();
|
||||
}
|
||||
|
||||
} // namespace Tests
|
||||
} // namespace CppTools
|
||||
|
||||
Reference in New Issue
Block a user