forked from qt-creator/qt-creator
CppTools: Add UI for file size limit of indexer
Task-number: QTCREATORBUG-16712 Change-Id: I92db8cbcac9669cbd5e4ee5f7ef6f613797c753a Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -448,7 +448,7 @@ void CppSourceProcessor::sourceNeeded(unsigned line, const QString &fileName, In
|
||||
}
|
||||
|
||||
const QFileInfo info(absoluteFileName);
|
||||
if (skipFileDueToSizeLimit(info))
|
||||
if (fileSizeExceedsLimit(info, m_fileSizeLimitInMb))
|
||||
return; // TODO: Add diagnostic message
|
||||
|
||||
// Otherwise get file contents
|
||||
@@ -505,6 +505,11 @@ void CppSourceProcessor::sourceNeeded(unsigned line, const QString &fileName, In
|
||||
switchCurrentDocument(previousDocument);
|
||||
}
|
||||
|
||||
void CppSourceProcessor::setFileSizeLimitInMb(int fileSizeLimitInMb)
|
||||
{
|
||||
m_fileSizeLimitInMb = fileSizeLimitInMb;
|
||||
}
|
||||
|
||||
Document::Ptr CppSourceProcessor::switchCurrentDocument(Document::Ptr doc)
|
||||
{
|
||||
const Document::Ptr previousDoc = m_currentDoc;
|
||||
|
||||
Reference in New Issue
Block a user