cppeditor: Show hints for qmlRegister... diagnostics

This fixes passing the hints from FindExportedCppTypes to
the actual cppeditor so they can be displayed to the
user.

Fixes: QTCREATORBUG-27243
Change-Id: Ibcb68296f044a9c6a96f40945d8a0e964be7f042
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Marcus Tillmanns
2022-06-21 10:06:47 +02:00
parent bbbae099a7
commit 627f6a2916
6 changed files with 80 additions and 2 deletions

View File

@@ -201,6 +201,8 @@ public:
std::unique_ptr<Core::ILocatorFilter> m_functionsFilter;
std::unique_ptr<Core::IFindFilter> m_symbolsFindFilter;
std::unique_ptr<Core::ILocatorFilter> m_currentDocumentFilter;
QList<Document::DiagnosticMessage> m_diagnosticMessages;
};
} // namespace Internal
@@ -1704,4 +1706,18 @@ QThreadPool *CppModelManager::sharedThreadPool()
return &d->m_threadPool;
}
bool CppModelManager::setExtraDiagnostics(const QString &fileName,
const QString &kind,
const QList<Document::DiagnosticMessage> &diagnostics)
{
d->m_diagnosticMessages = diagnostics;
emit diagnosticsChanged(fileName, kind);
return true;
}
const QList<Document::DiagnosticMessage> CppModelManager::diagnosticMessages()
{
return d->m_diagnosticMessages;
}
} // namespace CppEditor