summaryrefslogtreecommitdiff
path: root/src/plugins/compilationdatabaseprojectmanager
Commit message (Collapse)AuthorAgeFilesLines
* CMake Build: Do not add test qrc file in normal plugin buildCristian Adam2019-11-011-2/+2
| | | | | | | If you build without tests, you'll get an error. Change-Id: Id4ce543da6f1a450f91c3f4fb2d862989339db7b Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* CompilationDbManager: Add support for the "/imsvc" optionChristian Kandeler2019-10-291-10/+17
| | | | | | Fixes: QTCREATORBUG-23146 Change-Id: I024597d67e48595472b398ed40858bee17c1c4b9 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* CppTools: Move ProjectUpdateInfo to ProjectExplorerEike Ziller2019-09-121-3/+2
| | | | | | | Used for updating project parts, so move it near RawProjectPart. Change-Id: I77aeffbdbfb3d2ec0de600f61dcf7fbb7a355a98 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* CppTools: Move RawProjectPart to ProjectExplorerEike Ziller2019-09-111-17/+17
| | | | | | | | 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>
* Project: Rename Project::activeBuildEnvironment to ↵Tobias Hunger2019-08-281-1/+1
| | | | | | | | | | | | | Project::activeParseEnvironment This is used for parsing the project only, so reflect that in the name. Not all projects have build configurations, so the old name did not make too much sense for what this has been used for. Eventually this code should move into the BuildSystem. Change-Id: Iff766150b5fe370f2912b0b3b15348b1c1fad5b5 Reviewed-by: hjk <hjk@qt.io>
* CompilationDb: Properly set up build infoChristian Kandeler2019-08-271-1/+2
| | | | | | | Avoids e.g. soft asserts in TargetSetupWidget. Change-Id: I9640ada5d2d015c25c04ddfa2a2443b7444788db Reviewed-by: hjk <hjk@qt.io>
* ProjectExplorer: Set up hack to funnel information to buildstep ctorshjk2019-08-222-9/+3
| | | | | | | | | | | | For now, store most of BuildInfo in the BuildConfiguration. This will allow accessing it in the BuildStep ctors so the BuildSteps can be fully setup without polishing afterwards (as currently done in the main build steps of the three buildsystems, and Nim) This in meant to be temporary to a large degree. Change-Id: If6ade6052f4b96670995399ae97ef7d2313f632a Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* CompilationDatabase: Simplify based on Project::projectFileIsDirty signalTobias Hunger2019-08-192-9/+10
| | | | | Change-Id: Icfcbae73f611d967a7cc2db7c249f6f7190f5926 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ProjectExplorer: De-virtualize some more virtual methodsTobias Hunger2019-08-131-1/+0
| | | | | | | | | Use setters/getters for the bool flags in Project::needsBuildConfigurations() and Project::hasMakeInstallEquivalent. Change-Id: I5ce937c3a5e8e0db627cda02a9007f8c28ccda0c Reviewed-by: hjk <hjk@qt.io>
* ProjectExplorer: Use RAII pattern for parsing start/stop signallingTobias Hunger2019-08-093-15/+32
| | | | | Change-Id: I13de537140f265db3e3d0ab1cd924d6897cd90c8 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ProjectExplorer: Add convenience Project::addTargetFor{Default,}Kithjk2019-08-011-1/+1
| | | | | | | Less noise on the user side. Change-Id: I5cdf4af4910a3cc1ee0af1b43fcbc7329a6d59db Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* CompilationDataBasePM: Do not delay creating targetshjk2019-08-012-7/+1
| | | | | | | A target can/should handle/use unparsed projects just fine. Change-Id: I54b8399eab4b4fe7ead2de3cef8ab25cc7bbc621 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix compile after FileName dropChristian Stenger2019-07-241-1/+1
| | | | | | | Amends 44acfc0702d0. Change-Id: I1bddb0642e181b0a02d4ecba7ff1ae282218338f Reviewed-by: hjk <hjk@qt.io>
* Avoid warning on empty expressionshjk2019-07-231-2/+2
| | | | | | | | For some reason, Q_UNUSED includes already a semicolon, adding one on the user side creates an additional empty statement. Change-Id: I9c5e8fac381345a60792cb75e2938fd53958d3b0 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Make the project managers tell the code model about include pathsChristian Kandeler2019-07-121-1/+1
| | | | | | | | ... from the environment. Fixes: QTCREATORBUG-17985 Change-Id: I9b54e550121cfcc0684a6e173337d59d235c6107 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* ProjectExplorer: Merge BuildConfigurationFactory::availableBuildshjk2019-06-272-20/+9
| | | | | | | ... and availableSetups as far as mechanically possible. Change-Id: Ia1d7babe943eea25da97cef7838187c234378673 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ProjectExplorer: Align signatures of BuildConfigurationhjk2019-06-272-4/+3
| | | | | | | | | | ... availableBuilds() and availableSetups(). Goal is to merge them and inline all the local createBuildInfo() functions. Change-Id: I9f19093163808b6da6dc83977894420e08a1edd9 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ProjectExplorer etc: More FilePath usagehjk2019-06-262-4/+3
| | | | | | | Mostly for project files. Change-Id: Icb6059f80758865e42cc9f9c092ec6782770dfd7 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Use build step ids for construction in more caseshjk2019-06-261-2/+1
| | | | | Change-Id: If2deb7c02c082e29cc6b1f0408c0d0e06d1c584b Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* CompilationDBProjectManager: Handle relative sysrootChristian Kandeler2019-06-041-1/+1
| | | | | | Fixes: QTCREATORBUG-22388 Change-Id: I030b105897bd483c17aaf86229d4515b2dd747d3 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* Utils: Rename FileName to FilePathhjk2019-05-285-33/+33
| | | | | | | | 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>
* ExtensionSystem: Move away from QListEike Ziller2019-05-272-3/+3
| | | | | | | | Qt 6 API will move away from it. Use QVector for API and some std container for internal things. Change-Id: Iff14d48a47d5ac52ade875d9c8c84ad8a4f577d8 Reviewed-by: hjk <hjk@qt.io>
* CMake build: Add new files in compilation database pluginEike Ziller2019-05-231-0/+1
| | | | | | Change-Id: I4d83d77e70a99d8e9fb76e09fa95a70f24e4162f Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* CompilationDbProjectmanager: Fix build for older compilersChristian Kandeler2019-05-231-2/+2
| | | | | Change-Id: Ie84e5d06b672a335c68528fb1acf4b7492d998cd Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CMake build: Add ability to disable building of individual pluginsEike Ziller2019-05-231-5/+4
| | | | | | | | | | | | | | Adds a cache entry "BUILD_PLUGIN_${NAME}", defaulting to ON which can be set to OFF to disable building of a plugin. Adds a extend_qtc_plugin function that should be used to add properties to a plugin after add_qtc_plugin, instead of the standard CMake functions target_... . The new function results in a no-op if the plugin was disabled. Change-Id: I57f6799620aea0aaa8b56acead4815ccced95911 Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* CompilationDbProjectManager: Sanitize project parsingChristian Kandeler2019-05-238-180/+383
| | | | | | | | | | 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>
* Utils: Make FileName::canonicalPath a memberhjk2019-05-201-4/+2
| | | | | Change-Id: I8d7450dec5c4c14ae3e007d1d66f1a9c3c98f807 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Qt Creator CMake portCristian Adam2019-05-171-0/+16
| | | | | | | | | | | | | | 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>
* More FileName::appendPath() -> .pathAppended()hjk2019-05-171-6/+3
| | | | | Change-Id: I403d34e4f52f758339c158efc7a11fd329e3e043 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Some more FileName::appendPath() -> pathAppended() changeshjk2019-05-171-2/+2
| | | | | Change-Id: Ie494f7ae8a96d97c9497b3ef38d774d2cf787b7f Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* ProjectExplorer: Remove BuildTargetInfoList wrapper classhjk2019-05-141-4/+1
| | | | | Change-Id: I1a2ae06ec8c5b7278abca2386834d7edd31597d7 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* CompilationDatabase: enable the listing of non-cpp filesThomas Otto2019-05-023-3/+56
| | | | | | | | | Files listed in an optional "compile_database.json.files" are also visible in the project, similar to the GenericProjectManager. Change-Id: I1250b674298079bab90a0ffe036107a09b4ac6e5 Reviewed-by: Thomas Otto <totto@zbh.uni-hamburg.de> Reviewed-by: hjk <hjk@qt.io>
* CompilationDatabase: Asjust the sysroot and target handlingIvan Donchevskii2019-04-303-22/+36
| | | | | | | | | | | | | | If the sysroot option is found - set it as a kit sysroot (only in CompilationDatabase project where we have a cloned kit which does not affect the other existing kits). In other cases use the backup for the sysroot from the toolchain (can exist for clang toolchains based on mingw). Provide target when searching builtin include paths for clang. Fixes: QTCREATORBUG-22339 Change-Id: Ibe07c2e490ba4f7e0d259e6df698d641dbfd0298 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* CompilationDatabase: Allow the second root nodeIvan Donchevskii2019-04-291-11/+31
| | | | | | | | The 'directory' field of a compilation database can be in many cases another root directory to look into. Change-Id: Ie0d11bdc706f09e4d466b20fef614dd6ce00d4e9 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* CompilationDatabase: Allow to set custom build step and run commandIvan Donchevskii2019-04-293-1/+93
| | | | | | | | | In addition export the ProcessStep class from ProjectExplorer not to duplicate the code. Task-number: QTCREATORBUG-21727 Change-Id: I43d0c83b0338995fdb37ace940092c83ce2b6820 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* CompilationDatabase: Properly detect relative pathsIvan Donchevskii2019-04-261-3/+1
| | | | | | Fixes: QTCREATORBUG-22338 Change-Id: I0fcbd952d3aca4dfd8e56eb00e6a27bd1f1c51fe Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* CompilationDatabase: Fix few bugs and plugin testsIvan Donchevskii2019-04-263-15/+37
| | | | | | | | | | | - do not convert the DOS path if it does not exist - pass the proper flags to addDriverModeFlagIfNeeded - reset the kit toolchain before picking the matching one - do not show the popup when running plugin tests - clang++ contains 'g++' but it's not a gcc compiler Change-Id: Ia5018a2131bb123202b87e34e0ac3a79f0feb45d Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* RemoteLinux: Retrieve deployment info from local install rootChristian Kandeler2019-04-231-0/+1
| | | | | | | | | | | | | | | | This provides correct deployment information as seen by the build system when Qt Creator cannot retrieve it directly. It's most useful for autotools and cmake projects, but can also help with qmake in certain edge cases. [ChangeLog] It is no longer necessary to provide a QtCreatorDeployment.txt file when using CMake projects with remote Linux devices. Fixes: QTCREATORBUG-21855 Change-Id: I27e07a45dd1565e489f4b573cc3fff8191c57d9b Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: hjk <hjk@qt.io>
* CompilationDatabase: Force QString implicit sharingIvan Donchevskii2019-04-163-13/+24
| | | | | | | | | Most of the flags in compilation database are the same, let's share them by inserting them all into the temporary QSet of QString-s. Change-Id: I7d9b410b4b0bee40247434b49371bd37214d4c59 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* CompilationDatabase: Ask for the root path and scan for headersIvan Donchevskii2019-04-054-17/+138
| | | | | | | | | | | | | | | Let's use the same approach we have for CMake projects by using the same TreeScanner class. Compilation database does not have a concept of the root directory so let's show a file dialog and ask for it the first time the project is loaded. Next times we open it we take this path from settings. This root path can later be changed from the project tree context menu. Fixes: QTCREATORBUG-22031 Change-Id: I151aed8d0504b2e8aa14aa774cad25f8c86d5c17 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: hjk <hjk@qt.io>
* Merge remote-tracking branch 'origin/4.9'Eike Ziller2019-03-212-7/+25
|\ | | | | | | Change-Id: If36258b8e572b5c7875433a31a836e4f06e27286
| * CompilationDatabase: Refresh the tree on the JSON file updateIvan Donchevskii2019-03-152-7/+25
| | | | | | | | | | | | | | | | | | Reparse the compile_commands.json file when it has changed. Fixes: QTCREATORBUG-21733 Change-Id: I8e5a99efd136b1d46a417817bde5b5b989109eea Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* | ProjectExplorer: Un-protect ProjectNode constructorhjk2019-02-261-8/+1
| | | | | | | | | | | | | | | | Not much protection needed, and not provided either, as seen in the removed workarounds. Change-Id: Ib33f6481cdb04481c0324bdeb57eb50143ecb62f Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | ProjectExplorer: Use a setter for the Node's typehjk2019-02-261-2/+1
| | | | | | | | | | Change-Id: I3cc496151888cdecff0be54043a24fefe5ee2b02 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | ProjectExplorer: Replace FolderNode ctor display argumenthjk2019-02-261-1/+2
| | | | | | | | | | | | | | ... by use of the setter. Change-Id: Ie6bf15b4dfae4d4e4d98694313b6e7dc9a22c117 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | ProjectExplorer: Remove FileNode's isGenerated constructor boolhjk2019-02-251-6/+2
| | | | | | | | | | | | | | Use setter of base class, similar to setListInProject() before. Change-Id: Id620f0084a5dec0410f29c80f8f6393a6bcd5050 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* | ProjectExplorer: Rename KitInformation to KitAspectChristian Kandeler2019-02-111-4/+4
|/ | | | | | | | | | | The name "KitInformation" does not properly convey the fact that it represents a certain *aspect* of a kit. The same goes for "KitConfigWidget", which in addition was inconsistent with "KitInformation". We now use "KitAspect" and "KitAspectWidget". Change-Id: I9804ee4cedc4d61fad533ea1dd4e4720e67fde97 Reviewed-by: hjk <hjk@qt.io>
* CppTools: Simplify ProjectUpdateInfoNikolai Kosjar2019-01-101-5/+6
| | | | | | | ...by using KitInfo. Change-Id: I17b4dd6c368ba8b10b765f12a4663c041c9be7e5 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* CppProjectUpdater: Remove unread attributeBernhard Beschow2019-01-061-1/+1
| | | | | | Change-Id: I51123e5b5609de431cfa6d1558aed0b9739ff9c8 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* CompilationDatabase: Fix directory hierarchyMichael Weghorn2018-12-191-10/+5
| | | | | | | | | | | | | | | | | | | | When checking whether a child directory already exists, only check whether that directory is present as a direct child of the given parent, don't search recursively. Otherwise the directory hierarchy in the project outline can get messed up if multiple directories with the same name exist at different levels in the folder hierarchy. Side note: Besides avoiding an incorrect folder hierarchy, avoiding the recursive search also speeds up building up the folder structure (e.g. it took ~4 instead of ~20 seconds for building up the hierarchy of the LibreOffice source tree in my case). Fixes: QTCREATORBUG-21725 Change-Id: I5fc3c5c85d44ad8e3664f29e9143fc070d488c7a Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>