forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.6'
Change-Id: I49e8b8442e2b5edffbea19cb2bba97443ebc3d2a
This commit is contained in:
@@ -101,10 +101,8 @@ ClangEditorDocumentProcessor::~ClangEditorDocumentProcessor()
|
||||
m_parserWatcher.cancel();
|
||||
m_parserWatcher.waitForFinished();
|
||||
|
||||
if (m_projectPart) {
|
||||
m_communicator.unregisterTranslationUnitsForEditor(
|
||||
{ClangBackEnd::FileContainer(filePath(), m_projectPart->id())});
|
||||
}
|
||||
if (m_projectPart)
|
||||
unregisterTranslationUnitForEditor();
|
||||
}
|
||||
|
||||
void ClangEditorDocumentProcessor::runImpl(
|
||||
@@ -384,11 +382,6 @@ QFuture<CppTools::ToolTipInfo> ClangEditorDocumentProcessor::toolTipInfo(const Q
|
||||
static_cast<quint32>(column));
|
||||
}
|
||||
|
||||
ClangBackEnd::FileContainer ClangEditorDocumentProcessor::fileContainerWithArguments() const
|
||||
{
|
||||
return fileContainerWithArguments(m_projectPart.data());
|
||||
}
|
||||
|
||||
void ClangEditorDocumentProcessor::clearDiagnosticsWithFixIts()
|
||||
{
|
||||
m_diagnosticManager.clearDiagnosticsWithFixIts();
|
||||
@@ -442,7 +435,6 @@ void ClangEditorDocumentProcessor::registerTranslationUnitForEditor(CppTools::Pr
|
||||
if (m_projectPart) {
|
||||
if (projectPart->id() == m_projectPart->id())
|
||||
return;
|
||||
m_communicator.unregisterTranslationUnitsForEditor({fileContainerWithArguments()});
|
||||
}
|
||||
|
||||
m_communicator.registerTranslationUnitsForEditor(
|
||||
@@ -450,6 +442,13 @@ void ClangEditorDocumentProcessor::registerTranslationUnitForEditor(CppTools::Pr
|
||||
ClangCodeModel::Utils::setLastSentDocumentRevision(filePath(), revision());
|
||||
}
|
||||
|
||||
void ClangEditorDocumentProcessor::unregisterTranslationUnitForEditor()
|
||||
{
|
||||
QTC_ASSERT(m_projectPart, return);
|
||||
m_communicator.unregisterTranslationUnitsForEditor(
|
||||
{ClangBackEnd::FileContainer(filePath(), m_projectPart->id())});
|
||||
}
|
||||
|
||||
void ClangEditorDocumentProcessor::updateTranslationUnitIfProjectPartExists()
|
||||
{
|
||||
if (m_projectPart) {
|
||||
@@ -626,17 +625,6 @@ static QStringList fileArguments(const QString &filePath, CppTools::ProjectPart
|
||||
+ precompiledHeaderOptions(filePath, projectPart);
|
||||
}
|
||||
|
||||
ClangBackEnd::FileContainer
|
||||
ClangEditorDocumentProcessor::fileContainerWithArguments(CppTools::ProjectPart *projectPart) const
|
||||
{
|
||||
const auto projectPartId = projectPart
|
||||
? Utf8String::fromString(projectPart->id())
|
||||
: Utf8String();
|
||||
const QStringList theFileArguments = fileArguments(filePath(), projectPart);
|
||||
|
||||
return {filePath(), projectPartId, Utf8StringVector(theFileArguments), revision()};
|
||||
}
|
||||
|
||||
ClangBackEnd::FileContainer
|
||||
ClangEditorDocumentProcessor::fileContainerWithArgumentsAndDocumentContent(
|
||||
CppTools::ProjectPart *projectPart) const
|
||||
|
||||
Reference in New Issue
Block a user