diff options
author | hjk <hjk@qt.io> | 2022-11-24 14:11:12 +0100 |
---|---|---|
committer | hjk <hjk@qt.io> | 2022-12-08 12:07:45 +0000 |
commit | b354421f27d86ffaff38782f3312d8fd844f7d9a (patch) | |
tree | 32fee1003f4a478708f8f2c937f5b72b05cb67e3 /src/plugins/cppeditor/cppsourceprocessor.cpp | |
parent | 5c86f58bdd790874a80f050c595e5f27fe540e10 (diff) | |
download | qt-creator-b354421f27d86ffaff38782f3312d8fd844f7d9a.tar.gz |
CppEditor: Use FilePath in fileSizeExceedsLimit()
... and adapt caller side.
Change-Id: Idd832101962dcdc8b24f96bebbdb77fd3e29ba7c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src/plugins/cppeditor/cppsourceprocessor.cpp')
-rw-r--r-- | src/plugins/cppeditor/cppsourceprocessor.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/plugins/cppeditor/cppsourceprocessor.cpp b/src/plugins/cppeditor/cppsourceprocessor.cpp index df34da8edf..97537b5e3c 100644 --- a/src/plugins/cppeditor/cppsourceprocessor.cpp +++ b/src/plugins/cppeditor/cppsourceprocessor.cpp @@ -422,8 +422,7 @@ void CppSourceProcessor::sourceNeeded(int line, const FilePath &filePath, Includ return; } - const QFileInfo info = absoluteFilePath.toFileInfo(); - if (fileSizeExceedsLimit(info, m_fileSizeLimitInMb)) + if (fileSizeExceedsLimit(absoluteFilePath, m_fileSizeLimitInMb)) return; // TODO: Add diagnostic message // Otherwise get file contents @@ -445,8 +444,8 @@ void CppSourceProcessor::sourceNeeded(int line, const FilePath &filePath, Includ Document::Include inc(include.toString(), include, 0, IncludeLocal); document->addIncludeFile(inc); } - if (info.exists()) - document->setLastModified(info.lastModified()); + if (absoluteFilePath.exists()) + document->setLastModified(absoluteFilePath.lastModified()); const Document::Ptr previousDocument = switchCurrentDocument(document); const QByteArray preprocessedCode = m_preprocess.run(absoluteFilePath, contents); |