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:
Nikolai Kosjar
2016-08-16 13:37:49 +02:00
parent 6c00095181
commit 83ea1f4deb
12 changed files with 155 additions and 23 deletions

View File

@@ -32,6 +32,7 @@
#include "cppsourceprocessor.h"
#include "cpptoolsconstants.h"
#include "cpptoolsplugin.h"
#include "cpptoolsreuse.h"
#include "searchsymbols.h"
#include <coreplugin/icore.h>
@@ -59,6 +60,7 @@ public:
ProjectPartHeaderPaths headerPaths;
WorkingCopy workingCopy;
QSet<QString> sourceFiles;
int indexerFileSizeLimitInMb = -1;
};
class WriteTaskFileForDiagnostics
@@ -179,6 +181,7 @@ void indexFindErrors(QFutureInterface<void> &future, const ParseParams params)
void index(QFutureInterface<void> &future, const ParseParams params)
{
QScopedPointer<CppSourceProcessor> sourceProcessor(CppModelManager::createSourceProcessor());
sourceProcessor->setFileSizeLimitInMb(params.indexerFileSizeLimitInMb);
sourceProcessor->setHeaderPaths(params.headerPaths);
sourceProcessor->setWorkingCopy(params.workingCopy);
@@ -349,6 +352,7 @@ QFuture<void> BuiltinIndexingSupport::refreshSourceFiles(const QSet<QString> &so
CppModelManager *mgr = CppModelManager::instance();
ParseParams params;
params.indexerFileSizeLimitInMb = indexerFileSizeLimitInMb();
params.headerPaths = mgr->headerPaths();
params.workingCopy = mgr->workingCopy();
params.sourceFiles = sourceFiles;