summaryrefslogtreecommitdiff
path: root/src/plugins/compilationdatabaseprojectmanager/compilationdbparser.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Utils: Rename asynctask.{cpp,h} -> async.{cpp,h}Jarek Kobus2023-05-031-1/+1
| | | | | | | Follows AsyncTask -> Async rename. Change-Id: I37f18368ab826c9960a24087b52f6691bb33f225 Reviewed-by: hjk <hjk@qt.io>
* ProjectExplorer: Proliferate FilePath a bithjk2023-03-151-1/+1
| | | | | Change-Id: Ia671a1de17b9e58764375c5f64cc47b053b0725a Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* CompilationDBParser: Use QtConcurrent invocation for async runJarek Kobus2023-03-091-2/+2
| | | | | Change-Id: I9649db2d7c890e89ddc3f5da36715b4fa6d5219b Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Remove unneeded includes of task.h and taskhub.hJarek Kobus2023-02-141-1/+0
| | | | | | | | | And some other includes spotted by the way. Change-Id: Icd5eadf16617506fe48fae52ff0639d247002d75 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* CompilationDatabaseProjectManager: Tr::tr()Alessandro Portale2023-02-101-2/+3
| | | | | Change-Id: I5a4b05ce3eab90cfe05c297fa3971f94270ec474 Reviewed-by: hjk <hjk@qt.io>
* CompilationDBPM: Adapt to FilePath changeChristian Stenger2023-01-301-5/+2
| | | | | Change-Id: Idc2987e0568d34cf024cb170aa604f47053c9617 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Remove GPL-3.0+ from license identifiersKai Köhne2023-01-061-1/+1
| | | | | | | | | | | | | | | Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0, this applies only to a hypothetical newer version of GPL, that doesn't exist yet. If such a version emerges, we can still decide to relicense... While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only Change was done by running find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \; Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Use SPDX license identifiersLucie Gérard2022-08-261-24/+2
| | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Task-number: QTBUG-67283 Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* CompilationDatabaseProjectManager: Be more careful with filteringChristian Kandeler2022-08-021-4/+4
| | | | | | | | | Do not blindly remove all flags that contain the file's base name. Fixes: QTCREATORBUG-27990 Change-Id: Ib51b65a8694e82ec22af859176b0db0e5d86b5f0 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* CompilationDatabaseProjectManager: Fix cached state being unhandledAlibek Omarov2022-07-261-0/+3
| | | | | | | | | | | | In this code, database file is being hashed and if hash stays the same, parser quickly returns ParseResult::Cached. But as database never gets read, source tree isn't being built, thus dbContents() never gets called I moved ParseGuard::markAsSuccess() call to the finish() method of parser, so we tell ProjectExplorer that parsing finished successfully on Cached state Change-Id: I7ea28017e653ac6e2d7f50047c09a6eb7ecda13f Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ProjectExplorer: Use FilePath for sysrootshjk2022-06-301-0/+2
| | | | | | | | | ... and reduce to the relevant part when passing to cmake. Task-number: QTCREATORBUG-27229 Change-Id: I7cde2ff04530caf439d6707c2c6d15a8e734ae0b Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Mimetypes: Make implementation switchable between new and oldEike Ziller2022-02-251-1/+1
| | | | | | | | | | | | | | | | | | - configure with QTC_USE_NEW_MIMEDATABASE to switch to the new one in utils/mimetypes2/ - added utils/mimeutils.h header for the Qt Creator specific static wrappers, that also includes the "public" headers for MimeType et al from the new or old implementation, depending on configuration - change all utils/mimetypes/ includes to utils/mimeutils.h - move the implementation for the wrappers to utils/mimetypes(2)/mimeutils.cpp - also move the MimeDatabase declaration in the "old" implementation back to utils/mimetypes/mimedatabase.h Change-Id: Ie8de229c035d6cd9a5e4739dc0fa78d9c17228e3 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* CompilationDbProjectManager: Fix tree scanningChristian Kandeler2021-10-221-2/+2
| | | | | | | | | | - We checked for the QFuture's canceled status at a time where it would always yield true. - A pointless default value was used for the project root path. Fixes: QTCREATORBUG-26356 Change-Id: I4d17c6ecb7e9e7e71df737d85b42feb37d3ead5d Reviewed-by: David Schulz <david.schulz@qt.io>
* CompilationDatabaseProjectManager: Fix unexpected double emit of signalChristian Kandeler2021-09-161-6/+12
| | | | | | | | Do not rely on QFutureWatcher::isFinished(), which triggers a crash in the plugin unit test with Qt 6 (race condition?). Change-Id: I379d894ebd4a28a64b1e70e0cee6eef9ab720a14 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CMake: Do not create file system node in main threadEike Ziller2021-06-231-2/+3
| | | | | | | | | | | | | The file system scanning was already in a thread, but creating a tree from the flat list of file nodes was still done in the main thread. Creating the tree looks for and creates folder nodes as needed for each file node, which is not that big of a deal but still takes 1/3 of a second for the Qt Creator source tree. Task-number: QTCREATORBUG-25783 Change-Id: I28948ed3ff5233f6fc4b86e93da94d882b81e231 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* Utils: add FilePath::baseNameDavid Schulz2021-06-031-1/+1
| | | | | | | Removing some FilePath::toFileInfo() calls Change-Id: I49be2ef260f225e07b64ee8ace6a8cd47a9d8bb2 Reviewed-by: hjk <hjk@qt.io>
* CompilationDatabase: Clean pathsMartin Kampas2020-10-021-2/+2
| | | | | | | | | File paths in compile_database.json may contain redundant components ("./" or "../"). These confuse the code model, which then fails to associate the document with the project node. Change-Id: I7c74a24789a67b761b0737a41d1dd70d2dfd5f3d Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* CompilationDbProjectManager: Do not canonicalize file pathsChristian Kandeler2020-04-231-1/+1
| | | | | | | | | | In particular, we do not want to follow symbolic links, but see the file names as they appear in the project file. Fixes: QTCREATORBUG-23511 Change-Id: Ibf83ac143933fa0c9568dd4e3c0be825d8ba8f0b Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* ProjectExplorer: Move BuildSystem owership to BuildConfigurationhjk2019-11-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ... or Target. This patch moves build system from conceptually "one per project" to "one per target (i.e. per project-and-kit)" or "per BuildConfigurations" for targets where the builds differ significantly. Building requires usually items from the kit (Qt version, compiler, ...) so a target-agnostic build is practically almost always wrong. Moving the build system to the target also has the potential to solve issues caused by switching targets while parsing, that used Project::activeTarget() regularly, with potentially different results before and after the switch. This patch might create performance/size regressions when several targets are set up per project as the build system implementation's internal data are duplicated in this case. The idea is to fix that by sharing per-project pieces again in the project implementation once these problems occur. Change-Id: I87f640ce418b93175b5029124eaa55f3b8721dca Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* CompilationDB: Reparse only on actual project file changeChristian Kandeler2019-10-221-16/+28
| | | | | | Fixes: QTCREATORBUG-22574 Change-Id: I39fe58f96c1ff9118405be225f39e5348304222e Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* ProjectExplorer: Use RAII pattern for parsing start/stop signallingTobias Hunger2019-08-091-7/+12
| | | | | Change-Id: I13de537140f265db3e3d0ab1cd924d6897cd90c8 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Utils: Rename FileName to FilePathhjk2019-05-281-8/+8
| | | | | | | | More in line with QFileInfo terminonlogy which appears to be best-of-breed within Qt. Change-Id: I1d051ff1c8363ebd4ee56376451df45216c4c9ab Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* CompilationDbProjectManager: Sanitize project parsingChristian Kandeler2019-05-231-0/+228
The parsing code used to access all kinds of stuff (e.g. the project tree and the toolchain manager) from the non-UI thread, which is not allowed. Fixes: QTCREATORBUG-22420 Change-Id: I4be47919d7e543376d31826dd380f66f4e060458 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>