aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/clangpchmanager
Commit message (Collapse)AuthorAgeFilesLines
* ExtensionSystem: Remove PluginSpec::isHiddenByDefaulthjk2020-06-161-1/+0
| | | | | | | Not used anymore. Change-Id: Ic73ba3024b9e6157ff044cb23450fc9dad3c4c02 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Disable ClangRefactoring by defaultEike Ziller2020-06-021-0/+1
| | | | | | | | | | It is too unstable even for experimental status. Change-Id: I38e483eaece00aec0211a81414c6c5a000bf283f Reviewed-by: Marco Bubke <marco.bubke@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Provide an empty default IPlugin::extensionsInitialized()hjk2020-02-072-5/+0
| | | | | | | And remove all empy re-implementations. Change-Id: I19f0b4e55c042c96693ecb89766f97f0a97b54ae Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Use less nullptr for empty flagshjk2020-01-211-2/+2
| | | | | Change-Id: Ic4eafdc8f204a432a752a97593380609a408a7de Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Utils: Rename FilePathList to simply FilePathshjk2019-12-181-1/+1
| | | | | | | The exact storage type does not really matter here. Change-Id: Iefec40f0f5909c8e7ba3415db4a11962694e1b38 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Fix build with namespaced QtChristian Kandeler2019-12-171-6/+4
| | | | | | Fixes: QTCREATORBUG-23368 Change-Id: I3887b08587becd46bc203bb0bc4069521247498f Reviewed-by: hjk <hjk@qt.io>
* Remove usages of deprecated APIs of QLayoutSona Kurazyan2019-09-021-2/+2
| | | | | | | | | | Replaced: QLayout::setMargin() -> QLayout::setContentsMargins() QLayout::margin() -> QLayout::getContentsMargins() Task-number: QTBUG-76491 Change-Id: If28ef6910b3afe5d04e4746b74f9362a3e3b3c8e Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Clang: Reduce database accessesMarco Bubke2019-08-274-38/+99
| | | | | | | | If we prefetch data from the database to the caches we reduce the database transaction calls which are quite expensive. Change-Id: I617a0d886807402e0a94291a913a77f989970b55 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Clang: Bulk add project file paths to databaseMarco Bubke2019-08-272-2/+28
| | | | | | | | This project part container generation because there is not anymore one single access to the database for every file path. Change-Id: I5f82022262fe89a976729d48ee4f098b74a1e1d1 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Let users disable environment entriesChristian Kandeler2019-07-223-4/+4
| | | | | | | | | It's helpful to be able to temporarily disable environment variables, as opposed to having to remove (and then re-add) them entirely. Fixes: QTCREATORBUG-20984 Change-Id: Ib0d287035b9357507c4c19faaf3a1517382506b5 Reviewed-by: hjk <hjk@qt.io>
* Merge "Merge remote-tracking branch 'origin/4.10'"The Qt Project2019-06-183-80/+9
|\
| * Merge remote-tracking branch 'origin/4.10'Eike Ziller2019-06-183-80/+9
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/libs/utils/consoleprocess.h src/libs/utils/consoleprocess_unix.cpp src/libs/utils/consoleprocess_win.cpp src/plugins/projectexplorer/devicesupport/sshdeviceprocess.cpp src/tools/clangrefactoringbackend/source/symbolscollector.cpp tests/unit/mockup/projectexplorer/project.h Change-Id: I8d10f26b9bcb54829ba31cdc2272885691df1e16
| | * Clang: Improve updatingMarco Bubke2019-06-173-80/+9
| | | | | | | | | | | | | | | | | | | | | | | | If project parts are up to date we send them directly to the indexer, so the indexer can decide we something needs an update. Change-Id: I7d4f32794c6b3a861cdefb3653a6dfd4e711f619 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* | | ClangPchManager: Workaround MSVC bugMarco Bubke2019-06-181-0/+3
|/ / | | | | | | | | | | | | | | MSVC creates copy constructors and operators with a non copyable member. Change-Id: I4cd9d05dc8d72e249d6c95a48da89c783c6550ca Fixes: QTCREATORBUG-22578 Reviewed-by: David Schulz <david.schulz@qt.io>
* | Fix qbs buildChristian Kandeler2019-06-181-0/+11
| | | | | | | | | | | | | | Cleaning up after 4bae5de36b. Change-Id: Ia03e2699aa1be26df152ed06a295301ac804b696 Reviewed-by: David Schulz <david.schulz@qt.io>
* | ClangPchManager: Add reindex button in settingsMarco Bubke2019-06-134-11/+80
| | | | | | | | | | | | | | After you have changed some settings you maybe want to reindex. Change-Id: I415f1597e6566fe45e5e25bccd359493921278c3 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* | Enable macro editing for the Clang indexerMarco Bubke2019-06-1320-12/+1020
|/ | | | | | | | Refactor much of the code from Environment* classes to NameValue* classes to share it with the preprocessor macro settings. Change-Id: Ica4ee817aa338230c422b30d91240d266248d226 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Clang: Filter macro QT_TESTCASE_BUILDDIR outMarco Bubke2019-06-051-0/+16
| | | | | | | | | We have to universalize it later with a UI so that user can set their own macros. Change-Id: I5385c3c1b01dbf77a1cbc2431103fcdea3f96118 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* Utils: Rename FileName to FilePathhjk2019-05-281-3/+3
| | | | | | | | 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>
* Qt Creator CMake portCristian Adam2019-05-171-0/+17
| | | | | | | | | | | | | | Based on Tobias Hunger's work from a few months ago. The CMake configuration needs libclang and Qt paths specified as CMAKE_PREFIX_PATH. Auto tests are run with "ctest". At the moment the pass rate is 87%. Change-Id: Iba98e39bf22077d52706dce6c85986be67a6eab0 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Clang: Fix system pre include search pathMarco Bubke2019-04-292-2/+2
| | | | | | | | We now get the resource path from creator. The -fPIC case is working now too. Change-Id: Id191e89e6d46706748d50440038a06a349972cc9 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* ClangPchManager: Remove target tripleMarco Bubke2019-04-291-1/+1
| | | | | | | We don't need it so far and it is creating trouble. Change-Id: Ia502452717b5be935e4ba2cd2de04007e4144199 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Clang: Fix crash if path does not existsMarco Bubke2019-04-161-0/+2
| | | | | Change-Id: I89cc2471c18bc25fdd46c1ad5901c199332cbd3e Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Clang: Improve project part updatingMarco Bubke2019-04-019-47/+91
| | | | | | | | | | | | The project part ids are now already created very early in the database. This removes some checks because we can assume that an id already exists. The project part are now completely persistent, so we can read them from the database and compare them with new generated from a new creator session. This should help to not recreate the same PCH again and again. Task-number: QTCREATORBUG-21151 Change-Id: Iced818ff9f7431eaed3e37978087cc0a43b9afda Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Add ICore::cacheResourcePath()Marco Bubke2019-03-042-3/+5
| | | | | | | | | | We need some directory where we save the index database and the precompiled headers. This files should be persistent but the user can delete them if he wants because we will rebuild them. Task-number: QTCREATORBUG-22012 Change-Id: I9f25eb48a9992d6385a96427ef9c10bc739a3567 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Clang: Fix progress barMarco Bubke2019-02-221-3/+2
| | | | | | | Task-number: QTCREATORBUG-21950 Task-number: QTCREATORBUG-21957 Change-Id: Ide39355a3f244f02b9e7fea544d0c1dd5f959e56 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* ClangPchManager: Show extra progress for dependency buildingMarco Bubke2019-02-223-9/+28
| | | | | | Task-number: QTCREATORBUG-21956 Change-Id: Id244c9ef9fc7825489daa143b21fcca78164d8c7 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Clang: Fix progress barMarco Bubke2019-02-223-3/+5
| | | | | | | | Sometimes the messages are not send immediately, so we force it. Task-number: QTCREATORBUG-21957 Change-Id: I9526cb4b4e3dd8b7a02e15f77bffdc51917d47c8 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* ClangPchManager: Do not build pch and index inactive project partsIvan Donchevskii2019-02-191-2/+11
| | | | | | | | | Some project parts should not be built as well as some files can be inactive inside project part. We should not try to build pch-s or index them. Change-Id: I8e62365b817a424ae38a0df94b6703820a4cde9d Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* ClangPchManager: Filter system include search pathsMarco Bubke2019-02-181-1/+21
| | | | | | | | | We want the include paths from outside the project handled as system include paths. This is speeding up the PCH creation. Task-number: QTCREATORBUG-21955 Change-Id: Ic80102f46f5a14897c7ef43da5efd4c0f88abbbc Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Observe the cration of extra compilerMarco Bubke2019-02-181-2/+13
| | | | | | | | We link into the extra compiler factory and notify the PchManager for every extra compiler creation. It enables to monitor if all extra compiler finished. Change-Id: If8da386c88909abd2e0e651e4336865c9dc5bf34 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* CppTools: Add sourceFilePath to AbstractEditorSupportMarco Bubke2019-01-241-3/+5
| | | | | | | | | | Provide the source path to track a generated file source. You can for example get the modified time stamp for the source file and use it for the generated file content. Task-number: QTCREATORBUG-21876 Change-Id: Ia422e128c5cb7a3dce88960f126152c2f65afb41 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* PchManager: Split pch tasks in project and system pch tasksMarco Bubke2019-01-213-36/+112
| | | | | | | | | | | | | | | | | | | Like you can see in the task numbers this patch is touching many different areas. So I will only touch the main parts. It is using a clang action instead of an extra process which will be enabling the handling of generated files in PCHs. The flags from the project part are now not anymore transformed in a command line but they are saved in the container semantically aware so that they can later be merged. Most of this patch is simply polishing of other patches. Task-number: QTCREATORBUG-21346 Task-number: QTCREATORBUG-21380 Task-number: QTCREATORBUG-21382 Task-number: QTCREATORBUG-21383 Task-number: QTCREATORBUG-21693 Task-number: QTCREATORBUG-21778 Change-Id: I9b0c02d8149b554254e819448fbc61eeaa5b7494 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Clang: Clean up CompilerOptionsBuilderNikolai Kosjar2018-12-031-1/+1
| | | | | | | | | | | | | | | No behavior change. * Remove virtual from methods that are not overridden * Move constant member functions that do no access any members into source file as static functions * Remove QLatin1String where possible * Make variable names a bit more consistent * Other minor stuff Change-Id: I34a582d5a468489e11365507b283e9aee157664f Reviewed-by: Marco Bubke <marco.bubke@qt.io> Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* ClangPchManager: Add UsedMacroFilterMarco Bubke2018-12-031-4/+5
| | | | | | | | | The compiler macros are filtered in system and project macros. Not used ones are removed. The original order of the macros is retained. Task-number: QTCREATORBUG-21548 Change-Id: Ic9265866bde033e6a9600f9e6439b1697ab73422 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Clang: Add progress bars for creating PCHs and indexingMarco Bubke2018-10-087-5/+151
| | | | | | Task-number: QTCREATORBUG-21112 Change-Id: Ie0c00a58f479a2fe7cbc7322490808509733ff0f Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Clang: Reuse thread based pipeline for pch creationMarco Bubke2018-09-247-182/+6
| | | | | | | | | | | The pch creation so far used signal and slots but there was no explicit pipeline. This patch is introducing the same architecture like the refactoring plugin. It is filtering out older project parts from the pipeline. Change-Id: Iaa6bd2ca1272231b97ebe1f5f7b2ce8e43bc590c Task-number: QTCREATORBUG-21111 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Clang: Fix build with LibToolingIvan Donchevskii2018-09-132-1/+6
| | | | | | | Do not build plugins when the tools part is not built. Change-Id: I3325707fe6446364f07a9ad5e5e039fc9fb6437d Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* Clang: Add refactoring project updaterMarco Bubke2018-09-121-0/+3
| | | | | | | | The project parts are now first used by the pch manager and then notified by the pch manager to the refactoring plugin. Change-Id: I88074d8891cd0de9721497bbafee0deffc0b6339 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* ClangRefactoring: Fix project part idMarco Bubke2018-09-121-1/+1
| | | | | | | | We used display name which is part of project part id instead of the id getter. Change-Id: I97aa343c4380f9eb8c8e6a4400156eeac1f40863 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Add system include path to HeaderPath and merge ProjectPartHeaderPathMarco Bubke2018-09-102-5/+5
| | | | | | | | | | | | | System include paths are appended after other includes by the compiler. So we should set them as system includes and not as normal includes. Otherwise we change the include order. Headers in system include paths are not cluttering the screen with unwanted warning and by the way improve performance too. ProjectPartHeaderPath was a dopperganger of HeaderPath, so we merged them. Change-Id: I7c394b4098b697de79761499ffcd5913cc02d652 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Add optional system include to compiler option builderMarco Bubke2018-08-141-1/+1
| | | | | | | | | | | | System includes suppress warnings and prevent indexing of unwanted symbols. Using system includes for all includes outside of the project can be quite advantageous. The rootProjectDirectory() can be extended to be set in the project settings. An automatic generation could be possible but could create an unwanted path which includes files outside of the perceived project. Change-Id: Ib9d3158f14f41efe1f6657f962d5c4437bb324b2 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* ClangRefactoring: Integrate generated filesMarco Bubke2018-08-144-19/+81
| | | | | | | | | | | This is an intermediate step to handle the indexing of the project parts completely. The generated files are now independently handled from the project parts. We still not handle the case the a file is indexed but the generated file is not provided. This will be done in a different patch. All provided data is now sorted too to improve merging. Change-Id: I09712b99217a881ec0a233d09aea8659fb787324 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Fix qbs build when no llvm is presentChristian Kandeler2018-08-101-13/+2
| | | | | | | | | | | Some defines were set conditionally, but accessed unconditionally, which of course breaks the build. Make sure the defines are always set. Also gather them in a module, instead of copying the code all over the place. Change-Id: Iac628da64fb3934872d912510936aeccd0e20247 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Clang: Provide include directory only for libclangIvan Donchevskii2018-08-081-1/+1
| | | | | | | | | Only libclang has issues with the include directory search therefore undefining include folders makes sense only for libclang options builder. Change-Id: Ie3f62f5f3a89503e6e0ab59e18889e92425c3abc Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* ClangRefactoring: Move generated files to own messagesMarco Bubke2018-08-081-3/+5
| | | | | | | | There must be a management about it but this will be added in a different change set. Change-Id: I47b6ce7f671f1c8ae07083d6d99c534069e3cc1a Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* ClangTools: Remove clang executable settingsIvan Donchevskii2018-05-041-0/+1
| | | | | | | | We use custom clang executable and it does not make sense anymore to give a choice of changing it. Change-Id: Icf86042ac3fcd08c320ef2bbdaabef1102b023b5 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* Clang: Disable PCHs generationMarco Bubke2018-04-121-3/+0
| | | | | | | Some important features are missing so it should be disabled. Change-Id: I24f8f2cd42c6c4d7152a36db0fe8496e4fb824a6 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Clang: Store the symbol kind in the databaseMarco Bubke2018-04-121-1/+6
| | | | | | | It is cleaning up some other stuff too. Change-Id: I75274356fd35f2ee8c84aedf8839c67506ab2355 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* ClangSupport: Use simpler structures in some caseshjk2018-04-061-1/+1
| | | | | | | | | The patch is mostly mechanical, but contains also a few spurious changes from values references for some local variables, foreach -> ranged for etc that I coulnd't resist. Change-Id: I58f0bd972546895eb318607cbfbd7ac35caf3f23 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>