aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/compilationdatabaseprojectmanager
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Replace QT_USE_FAST_{OPERATOR_PLUS,CONCATENTION} by QT_USE_QSTRINGBUILDERhjk2020-08-071-2/+1
| | | | | | | | | | QT_USE_FAST_CONCATENATION doesn't do anything nowadays. Using QT_USE_QSTRINGBUILDER is the same as QT_USE_FAST_OPERATOR_PLUS for QStrings and enables more QStringBuilder use for QByteArrays. Change-Id: Ibd297817c50d86661d47822799f989447249af1b Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Utils: Drop Utils::SkipEmptyParts againhjk2020-07-211-1/+1
| | | | | | | | We require Qt 5.14 nowadays. Change-Id: Iff245257d3cb19207007c0445ee13814e66152dd Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Core/Utils: Migrate further to Utils::Idhjk2020-07-061-5/+5
| | | | | | | The coreplugin/id.h header is kept for downstream for now. Change-Id: I8c44590f7b988b3770ecdc177c40783e12353e66 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix plugin unit tests when using projectsChristian Stenger2020-06-172-3/+5
| | | | | | | | | | | | | | The ClangTools and the AutoTest plugins use an internal mechanism to load and configure a project when performing their integrated unit tests. Both assumed to have exactly one kit present for these tests. Make it possible to have more kits present when starting with existing settings or if more kits get automatically generated when starting with clean settings. Change-Id: If2bc66320c4854f1d34a19d17107e8f0b7d64d39 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix Qt 5.15 deprecation warnings for QString::SkipEmptyPartsChristian Kandeler2020-06-161-1/+2
| | | | | | Task-number: QTCREATORBUG-24098 Change-Id: I03ee6811df4346754bbd652f2c3c97477f9cdb7e Reviewed-by: hjk <hjk@qt.io>
* CompilationDbProjectManager: Do not remove -fpic from command linesChristian Kandeler2020-05-292-5/+2
| | | | | | | | | | This flag is needed by the code model. The test case that had it on the command line was invalid (clang does not allow -fPIC with win32 targets). Fixes: QTCREATORBUG-24106 Change-Id: Ic95c82c2090ef5ee1a11d01d7e4387a5c80cda3c Reviewed-by: Nikolai Kosjar <pinaceae.pinus@gmail.com>
* Merge remote-tracking branch 'origin/4.12'Eike Ziller2020-05-261-2/+0
|\ | | | | | | | | | | | | | | | | Conflicts: cmake/QtCreatorIDEBranding.cmake qbs/modules/qtc/qtc.qbs qtcreator_ide_branding.pri Change-Id: Ic39945a0e3e140a9467b4b4f572929257ff3a324
| * CompilationDbPM: Do not change the kit's toolchainChristian Kandeler2020-05-201-2/+0
| | | | | | | | | | | | | | | | Amends 45d42d4518. Fixes: QTCREATORBUG-24047 Change-Id: I115eaf06fb3c055069918d20f360bd027f15d680 Reviewed-by: hjk <hjk@qt.io>
* | Merge remote-tracking branch 'origin/4.12'Eike Ziller2020-04-231-1/+1
|\| | | | | | | Change-Id: I296a61fe43aea134de9e7a6ee8042af3f45f5e99
| * 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>
* | BuildSystem: Clean up use of BuildSystem::(kit|target|project)Tobias Hunger2020-03-201-3/+3
| | | | | | | | | | Change-Id: I4852689cb54d02bb278f9cd596f1de506a43fc04 Reviewed-by: hjk <hjk@qt.io>
* | CompilationDb: Make use of BuildSystem base class parsing infrastructureChristian Kandeler2020-03-122-13/+2
|/ | | | | Change-Id: I928e173b35b87c0fcb8fc97785ddfa4a2414740d Reviewed-by: hjk <hjk@qt.io>
* CompilationDatabaseProjectManager: Fix autotestChristian Kandeler2020-03-042-0/+10
| | | | | | | Amends 45d42d4518. Change-Id: I7404bbc782278d09b419906a0d74f29d66c3867b Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CompilationDbManager: Do not create an extra targetChristian Kandeler2020-03-032-14/+0
| | | | | | | | | | | The hidden extra target creates all kinds of inconsistencies, e.g. between mini project target selector and target model. Besides, there is no reason why this project manager should behave differently from the others in this respect. Fixes: QTCREATORBUG-23518 Change-Id: I11022f63bed33191f6349681356b4dd9537de50c Reviewed-by: hjk <hjk@qt.io>
* De-Q_OBJECT-ify various IEditorFactory derived classeshjk2020-02-132-3/+1
| | | | | Change-Id: I1470b06d4e10073bb6e4f7ae735f9829fab3bb7b Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Provide an empty default IPlugin::extensionsInitialized()hjk2020-02-071-1/+0
| | | | | | | And remove all empy re-implementations. Change-Id: I19f0b4e55c042c96693ecb89766f97f0a97b54ae Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* ProjectExplorer: Move some of the BuildInfo setup code to central placeshjk2020-01-141-3/+2
| | | | | Change-Id: I8893366acb187ea1a94a8ca272ded2c46cb521d1 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ProjectExplorer: De-QObject-ify BuildConfigurationFactorieshjk2020-01-102-4/+2
| | | | | | | | | | | | | The QObject was not heavily used. Object name was for debugging only, translation context can be taken from the corresponding BuildConfiguration objects, the qobject_casts in the three big importers are replaced by dynamic_cast, which is good enough in that context. Take the opportunity to re-use translations from base BuildConfiguration for the common cases and sprinkle in some 'final'. Change-Id: I8e9727c98c6e943cb333556861c24e701c2bdf45 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ProjectExplorer: Replace BuildConfigurationFactory::availableBuildshjk2020-01-092-16/+10
| | | | | | | ... by a function object. Change-Id: I9953ba6915c0177e7c4067d36dd755fc2ba5cf84 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Revert "CompilationDatabase: Simplify rootPathFromSettings function call"hjk2020-01-072-6/+5
| | | | | | | | | This reverts commit ad729a4085ff159e2a612e689369a2b7220ba233. This breaks non-test builds. namedSettings() is a non-static in Project. Change-Id: I1675cddfd515a021482769d38092138dbaa055ee Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CompilationDatabase: Simplify rootPathFromSettings function callhjk2020-01-072-5/+6
| | | | | Change-Id: I073f6d0f9ad4100f1c93344624efd34a9fb4c225 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* CompilationDatabase: Remove unnneded ::fromMap() reimplementaionhjk2019-12-112-8/+0
| | | | | Change-Id: I2e9440f146b8ba485d3080e74927a05ae7d68824 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* ProjectExplorer: Use function object for special build config inithjk2019-12-092-12/+8
| | | | | Change-Id: I5da0f28ee1a64f8d9a3145f059019be702bee463 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Merge remote-tracking branch 'origin/4.11'Orgad Shaneh2019-12-071-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: cmake/QtCreatorIDEBranding.cmake qbs/modules/qtc/qtc.qbs qtcreator_ide_branding.pri src/plugins/mcusupport/mcusupportrunconfiguration.cpp src/plugins/python/pythonproject.cpp src/plugins/qmakeprojectmanager/qmakestep.cpp src/plugins/qmlprojectmanager/qmlproject.cpp src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp Change-Id: I22507be28fd80c49c9fee0dff5937a40db176a82
| * CompilationDatabaseProjectManager: Fix file classification errorChristian Kandeler2019-12-061-1/+1
| | | | | | | | | | | | Fixes: QTCREATORBUG-23143 Change-Id: I670a7858070fd8c0d62b872b22f9605cc6a3b329 Reviewed-by: hjk <hjk@qt.io>
* | ProjectExplorer: Settle on fixed set of build step listshjk2019-12-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Even if the implementation allowed different lists than 'build' and 'clean', that's the only set that has been used, ever. If really needed, this could be re-instated, but for now having them fixed removes part of the neeed for a two-phase construction and helps to simplify user code. Change-Id: I3df09a1829a7d020ef8963d358ea80f8d199ba13 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | CompilationDatabase: Avoid an unneeded casthjk2019-11-211-2/+2
| | | | | | | | | | Change-Id: I8f6d0d83b25738c164e6e29c317840058fdd8bfe Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | ProjectExplorer: Introduce and use a Target::buildSystemUpdated signalhjk2019-11-211-0/+2
| | | | | | | | | | Change-Id: I497d46866146600a1ed9162bd720c574ee4d4769 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | ProjectExplorer: Introduce per-buildsystem setRootProjectNodehjk2019-11-211-1/+1
| | | | | | | | | | | | | | | | Currently diverting to the original Project::setRootProjectNode. Idea is to focus on the BuildSystem <-> generated tree relation. Change-Id: I8b20173e364713f0919cf4f8b76a2f79ef8770bb Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | ProjectExplorer: Use a Kit to initialize KitInfohjk2019-11-201-1/+1
| | | | | | | | | | Change-Id: I70a83ff9a9da814b4e1ad9ce5e0b626105c09ca4 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* | ProjectExplorer: Move BuildSystem owership to BuildConfigurationhjk2019-11-194-54/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... 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>
* | Merge remote-tracking branch 'origin/4.11'Eike Ziller2019-11-041-2/+2
|\| | | | | | | Change-Id: Ie951c531a5b2efd8e6b972c4d04b7f1c681c8ef9
| * 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>
* | Merge remote-tracking branch 'origin/4.11'Eike Ziller2019-11-011-10/+17
|\| | | | | | | | | | | | | Conflicts: share/qtcreator/qml/qmlpuppet/qml2puppet/instances/quick3dnodeinstance.cpp Change-Id: I8ea57eba526ab830608fd928c28771c5441749f8
| * 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>
* | CompilationDbProjectManager: Set deployment data, if availableChristian Kandeler2019-10-292-27/+33
| | | | | | | | | | | | | | | | | | We use the same approach as for the generic project manager, namely the QtCreatorDeployment.txt file. Fixes: QTCREATORBUG-22965 Change-Id: Ia49dcd354b9ade8aeda259696aa29692cce1577b Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* | CompilationDB: Use standard setup mechanism for pluginhjk2019-10-242-44/+48
| | | | | | | | | | Change-Id: I06cb07d70e63af0883cc5c9a8f0db2b4b134f602 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | CompilationDB: Reparse only on actual project file changeChristian Kandeler2019-10-224-24/+49
|/ | | | | | Fixes: QTCREATORBUG-22574 Change-Id: I39fe58f96c1ff9118405be225f39e5348304222e 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>