From 83ea1f4deb4f5752f4eb1e36664761a7cdc79a9e Mon Sep 17 00:00:00 2001 From: Nikolai Kosjar Date: Tue, 16 Aug 2016 13:37:49 +0200 Subject: CppTools: Add UI for file size limit of indexer Task-number: QTCREATORBUG-16712 Change-Id: I92db8cbcac9669cbd5e4ee5f7ef6f613797c753a Reviewed-by: David Schulz Reviewed-by: Orgad Shaneh --- src/plugins/cpptools/cppmodelmanager.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/plugins/cpptools/cppmodelmanager.cpp') diff --git a/src/plugins/cpptools/cppmodelmanager.cpp b/src/plugins/cpptools/cppmodelmanager.cpp index d7e319d80f..ac0003e3dd 100644 --- a/src/plugins/cpptools/cppmodelmanager.cpp +++ b/src/plugins/cpptools/cppmodelmanager.cpp @@ -611,9 +611,9 @@ QByteArray CppModelManager::codeModelConfiguration() const return QByteArray::fromRawData(pp_configuration, qstrlen(pp_configuration)); } -static QSet tooBigFilesRemoved(const QSet &files, int fileSizeLimit) +static QSet tooBigFilesRemoved(const QSet &files, int fileSizeLimitInMb) { - if (fileSizeLimit == 0) + if (fileSizeLimitInMb <= 0) return files; QSet result; @@ -623,7 +623,7 @@ static QSet tooBigFilesRemoved(const QSet &files, int fileSize while (i.hasNext()) { const QString filePath = i.next(); fileInfo.setFile(filePath); - if (skipFileDueToSizeLimit(fileInfo, fileSizeLimit)) + if (fileSizeExceedsLimit(fileInfo, fileSizeLimitInMb)) continue; result << filePath; @@ -638,7 +638,7 @@ QFuture CppModelManager::updateSourceFiles(const QSet &sourceFile if (sourceFiles.isEmpty() || !d->m_indexerEnabled) return QFuture(); - const auto filteredFiles = tooBigFilesRemoved(sourceFiles, fileSizeLimit()); + const QSet filteredFiles = tooBigFilesRemoved(sourceFiles, indexerFileSizeLimitInMb()); if (d->m_indexingSupporter) d->m_indexingSupporter->refreshSourceFiles(filteredFiles, mode); -- cgit v1.2.1