summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/cpprawprojectpart.cpp
Commit message (Collapse)AuthorAgeFilesLines
* CppTools: Move RawProjectPart to ProjectExplorerEike Ziller2019-09-111-151/+0
| | | | | | | | Doesn't have any dependencies into CppTools anymore, therefore moving it reduces the dependencies of the project managers to CppTools as well. Change-Id: Ibe728abe59eb88a8877943dca1f48a85163e27ac Reviewed-by: hjk <hjk@qt.io>
* CppTools: Move QtVersion and BuildTargetTypeEike Ziller2019-09-101-2/+2
| | | | | | | | | | | | | QtVersion to utils/cpplanguage_details.h which already contains similar flags. BuildTargetType to ProjectExplorer, next to BuildTargetInfo (but not in the same header to not pull that in everywhere). Removes dependency on ProjectPart from RawProjectPart. Change-Id: I5791065e4266f20c2657ee4b1b594df04b238a1c Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* CppTools: Remove dependency of RawProjectPart to ProjectFileEike Ziller2019-09-031-2/+5
| | | | | | | | | | | | The feature to category files to ProjectFiles was used by the qmake project manager to specify if the file is "active", and by the Qbs project manager to avoid unnecessary MIME type checking. Make these two different use-cases explicit in the API. Change-Id: Ia5a7da37f100149366fc75060fe04687e15f2bd3 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* Extract heuristics to detect framework paths from CppRawProjectPartTobias Hunger2019-06-141-17/+25
| | | | | | | | | Move the code into a separate function of CppRawProjectPart so that it can be used by the project managers to do the framework detection magic as well. Change-Id: I80b9fdadb25005c7e089cb45429c91dd8549eecc Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* CppTools: modernizeAlessandro Portale2019-01-211-1/+1
| | | | | | Change-Id: Iaf02e4d026f1ac8b216833d83cd7a735e21ff60a Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Clang: Forward compiler options for gcc/clangNikolai Kosjar2019-01-161-1/+1
| | | | | | | Rely on clang to do the "right thing" with them. Change-Id: I44adf2cd5c61549896da3fc9b7c35c2fb0142060 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* CppTools/ProjectExplorer: Remove enum duplicationNikolai Kosjar2018-10-081-1/+1
| | | | | | | | ... between CppTools::ProjectPart and ProjectExplorer::ToolChain. Change-Id: I8b448747e454adbed77547460383b8515462cc81 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* ProjectExplorer: Rename IncludePathType to HeaderPathTypeTobias Hunger2018-09-131-2/+2
| | | | | | | | | | | | | It is the type used by the HeaderPath class, so reflect that in the name. I also considered to rename HeaderPath to IncludePath, but that name is reflected in a lot of users, which would also need to be adjusted for consistency. That would blow up the patch size for little value IMHO. Change-Id: I51421dbd3ab8b2874dc32fc82dc394c9b93ce5e9 Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* Add system include path to HeaderPath and merge ProjectPartHeaderPathMarco Bubke2018-09-101-5/+4
| | | | | | | | | | | | | 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>
* CppTools: Add target type information to project partChristian Stenger2017-09-181-0/+5
| | | | | | | | | | | Let project managers store information whether a project part belongs to an executable or a library and use this information inside the AutoTest plugin. This information will help to determine which targets are relevant for the execution of tests. Change-Id: I93b42797bf55225425398dc83aecea3c99eea290 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* Convert macros from plain QByteArray to a vector of structsMarco Bubke2017-09-141-2/+2
| | | | | | | | | | | The old code model expected the macros as C++ formatted text ("#define Foo 42) but newer targets like the Clang codemodel expect key value arguments like "-DFoo=42". So instead of parsing the text again and again we use an abstract data description. Task-number: QTCREATORBUG-17915 Change-Id: I0179fd13c48a581e91ee79bba9d42d501c26f19f Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* CppTools: Add target information to ProjectPartTobias Hunger2017-03-151-0/+5
| | | | | | | | | This is important to be able to map sources to actual things that are going to be built. Change-Id: I1aef940767d60192642ed79a1703cff8dfdad9e1 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CppTools: De-duplicate and rename function in ProjectPartNikolai Kosjar2017-03-091-1/+1
| | | | | Change-Id: I675ce4c9059d8ae4046f6a13aa7c04b88141d443 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* ProjectPart: Add callGroupIdTobias Hunger2017-03-091-0/+5
| | | | | | | | Do not rely on the projectfile being unique anymore. Change-Id: I52e63b3ac8aeca43ef70af1d59d1d8612bd3540e Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* ProjectPart: Allow for line/column information in project fileTobias Hunger2017-03-091-1/+3
| | | | | | | | | | Keep this information separate so that plugins using the information do not need to start parsing the project file. Change-Id: Ibecf431de1b12bbe820c6f8f9c986cffeb4972d2 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* CppTools/ProjectManagers: Reduce ui blocking when loading projectsNikolai Kosjar2017-02-201-0/+124
${AnyProject}::updateCppCodeModel() did two potentially not that cheap operations in the ui thread: (1) Querying the MimeDatabase for the mime type for the source files of the project. In 99.9% of the cases no files need to be read for this as the file extension will resolve the type. The expensiveness comes from the sheer number of files that can occur. (2) Calling compilers with the "(sub)project's compiler command line" to determine the macros. While the caches avoid redundant calls, the number of the unique compiler calls makes this still a ui-freezing experience. These two operations are moved into a worker thread. For this, the expensive compiler calls are encapsulated in thread safe lambdas ("runners") in order to keep the "mutexed" data minimal. The original API calls of the toolchains are implemented in terms of the runners. While adapting the project managers, remove also the calls to setProjectLanguage(). These are redundant because all of the project managers already set a proper value in the constructor. Also, currently there is no need (client) to report back detection of C sources in project parts. This also keeps CppProjectUpdater simple. There is still room for improvement: * Run the compiler calls in parallel instead of sequence. * Ensure that the mime type for a file is determined exactly once. Change-Id: I2efc4e132ee88e3c8f264012ec8fafe3d86c404f Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>