summaryrefslogtreecommitdiff
path: root/src/plugins/genericprojectmanager
Commit message (Collapse)AuthorAgeFilesLines
* BaseQtVersion: remove qmakeProperty(...) getterTobias Hunger2019-10-011-1/+1
| | | | | | | | | | | | Qt 6 will not use qmake to identify a Qt version, so this can not be part of the public interface of BaseQtVersion anymore. Provide getters for the information actually read via qmakeProperty(...). Use the getters whenever possible. Change-Id: Iadbee80b75e4f8b06caf90e7ed69fae2029b4dd7 Reviewed-by: hjk <hjk@qt.io>
* GenericProject: Make dependency on CppTools optionalEike Ziller2019-09-138-200/+29
| | | | | | | | | | | | | Especially in the light of the language server, the generic project is currently the project one can use for language servers that require a "project workspace". Makes it possibly to run Qt Creator with "-noload CppTools" if you still want to use generic projects with some other language. Change-Id: Ib9059289a2db4c44c0c1060a02fcdafacb885fbd Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* CppTools: Move RawProjectPart to ProjectExplorerEike Ziller2019-09-111-1/+1
| | | | | | | | 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>
* GenericProject: Little cleanupEike Ziller2019-09-031-9/+3
| | | | | Change-Id: I348f56ce2154530e7b6cc392cfaae2aa8621df41 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>
* 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>
* GenericProjectManager: Support framework pathsChristian Kandeler2019-08-192-4/+20
| | | | | | | | | Rather than adding yet another meta file, we use the .includes file with a special line prefix. Fixes: QTCREATORBUG-20099 Change-Id: I494e0143b8e0f1f8828a56d7487b2201f1680337 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* GenericProject: Simplify code based on Project::projectFileIsDirty signalTobias Hunger2019-08-162-33/+25
| | | | | Change-Id: I3e9eb892f22c716c3b6cf40498f232d234aa163e Reviewed-by: hjk <hjk@qt.io>
* ProjectExplorer: Use RAII pattern for parsing start/stop signallingTobias Hunger2019-08-091-2/+2
| | | | | Change-Id: I13de537140f265db3e3d0ab1cd924d6897cd90c8 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ProjectExplorer: Replace Project::projectConfigurationChangedhjk2019-08-022-33/+4
| | | | | | | | | | | | | | | | ... by a Project::buildConfigurationChanged. That's the only case used, and saves filtering on the receiver side. Also, the passed bc is (in non-null) the active one, so isActive checks are not necessary. The null case seems to be only possible to trigger when removing the currently active build configuration manually i.e. happens rarely, so having it trigger an unneeded final display update on the dying build config is tolerable, so drop the null check in such cases to achieve a more uniform pattern. Change-Id: I46f72e9e277767214dbd6920dd86b026a7084f46 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ProjectExplorer: Add convenience Project::addTargetFor{Default,}Kithjk2019-08-011-4/+2
| | | | | | | Less noise on the user side. Change-Id: I5cdf4af4910a3cc1ee0af1b43fcbc7329a6d59db Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* GenericProject: Normalize make step setuphjk2019-07-315-52/+19
| | | | | | | | | | We have only one id for the steps, so short of coming up with some fancy upgrade mechanism, stick to the one kind of step, but also use only one factory, and do the switch in the step constructor based on the nature of the parent buildsteplist. Change-Id: I8fcc599682840d61e4a7f8b6fb7b792aafdd8766 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ProjectExplorer: Use some setters for GenericMakeStephjk2019-07-261-2/+4
| | | | | | | | | Instead of using constructor arguments. This makes the constructor signatures uniform and allows construction of the steps by Id via the factories. Change-Id: Idba1b04ec674e36c39950d5949d42ac8043b28c3 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Import wizards: Visually improve the selected state of iconsAlessandro Portale2019-07-252-0/+0
| | | | | | | | | | This change adds a thin gray outline to the cvs, git and qmake/generic import wizard icons. In the selected state, they should now have a better visual contrast. Task-number: QTCREATORBUG-18936 Change-Id: I2a0f5dab74cdc5958f869a63756a4fc974ccad32 Reviewed-by: André Hartmann <aha_1980@gmx.de>
* Avoid warning on empty expressionshjk2019-07-232-3/+3
| | | | | | | | 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>
* Merge remote-tracking branch 'origin/4.10'Eike Ziller2019-07-222-6/+9
|\ | | | | | | Change-Id: I88a6704fb8d723a3cbdfb1a2d9c84741f30d4da6
| * GenericProjectManager: Do not crash on removing all filesChristian Stenger2019-07-192-6/+9
| | | | | | | | | | | | | | | | When removing all files from a generic project QC crashed on trying to access the first item of the empty file list. Change-Id: I85045bf126f4e12575305466f0f4a6c4191176d3 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | GenericProjectManager: Allow users to remove directories from a projectChristian Kandeler2019-07-182-4/+30
| | | | | | | | | | | | | | | | ... via the project context menu. Fixes: QTCREATORBUG-16575 Change-Id: I02650a8ef70ffe22c6a42a5450588be4506af925 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | Merge remote-tracking branch 'origin/4.10'Tim Jenssen2019-07-121-1/+1
|\ \ | |/ | | | | Change-Id: Iaf27911e4e9fb762c1a24c84c458462bafe95728
| * Avoid more deprecation warningshjk2019-07-051-1/+1
| | | | | | | | | | Change-Id: Icc7bb7a4ccf7fc9f89f6f668c194ccd440e5231c 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-27/+12
| | | | | | | | | | | | | | ... 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-3/+5
| | | | | | | | | | | | | | | | | | | | ... 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-5/+6
| | | | | | | | | | | | | | Mostly for project files. Change-Id: Icb6059f80758865e42cc9f9c092ec6782770dfd7 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | ProjectExplorer: Add special handling for removing filesVille Nummela2019-06-251-2/+4
|/ | | | | | | | | | | | | ... from a project which are pulled in via wildcards. Such files cannot be removed from a project file, because they are not listed verbatim. This kind of failure should not be reported to the user if the file is also deleted, as the file list will have the correct state after the next reparse. Fixes: QTCREATORBUG-22586 Done-with: Christian Kandeler <christian.kandeler@qt.io> Change-Id: I3dc66fe9a6594be7d0b86f46d830cd099ee49fd7 Reviewed-by: hjk <hjk@qt.io>
* Utils: Rename FileName to FilePathhjk2019-05-289-34/+34
| | | | | | | | 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>
* CMake build: Add ability to disable building of individual pluginsEike Ziller2019-05-231-3/+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>
* Generic Project: cut common part of path in project explorerMartin Haase2019-05-232-1/+23
| | | | | | | | | | | | | | | | | | | This is necessary, if the project files on a different directory than the source files. In this case, the project explorer will show the full path e.g. in windows starting by C: for each directory until the source files. use-case: some directory |- project directory |- *.creator & *.files & ... generic project files |- source directory |- some sub-directories and the source files Fixes: QTCREATORBUG-19454 Change-Id: I95eee4afdc11adf4281220edc5f6ff29da41a3a5 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: André Hartmann <aha_1980@gmx.de>
* Qt Creator CMake portCristian Adam2019-05-171-0/+21
| | | | | | | | | | | | | | 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>
* Some more FileName::appendPath() -> pathAppended() changeshjk2019-05-171-2/+2
| | | | | Change-Id: Ie494f7ae8a96d97c9497b3ef38d774d2cf787b7f Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* ProjectExplorer: Inline convenience overload that was used just oncehjk2019-05-031-1/+1
| | | | | Change-Id: I4b695a07b60df0d197f549657e0ce23ca4fe5ccb Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ProjectExplorer: Consolidate setup of build dir aspecthjk2019-04-291-8/+1
| | | | | | | | | | This is getting repetitive. There's a new connect too, that's not wrong in the current two uses and will be helpful in the upcoming Qbs one. Change-Id: I4a4923a43937922c66be1f73822103b1e3e7b077 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* GenericProject: Use the base BuildConfiguration config widgethjk2019-04-292-70/+14
| | | | | Change-Id: I24abc4a8086b39e796b3a4146dbcdbda70c89ee3 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* RemoteLinux: Retrieve deployment info from local install rootChristian Kandeler2019-04-232-0/+7
| | | | | | | | | | | | | | | | 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>
* ProjectExplorer: Flip default for ProjectNode::showInSimpleTreehjk2019-03-011-2/+0
| | | | | Change-Id: Ibd4f91ad55b2be93d20dfc4f583de95274e981ca Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ProjectExplorer: Remove FileNode's isGenerated constructor boolhjk2019-02-251-12/+6
| | | | | | | 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-1/+1
| | | | | | | | | | | 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>
* ProjectExplorer: Collapse BuildInfo hierarchyhjk2019-01-302-19/+17
| | | | | | | | | | | | | | ... to pass it around as real values, avoiding, among others, the need of occasional explicit deletion. The formerly extra members of the derived stuff are handled via an extra variant (for data) and via a functor in the build configuration factory. The change is mechanical. Change-Id: I19ca4e0c5f0a5b196fc16dfb98bb005dc679f855 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ProjectExplorer: Rename IBuildConfigurationFactoryhjk2019-01-291-2/+2
| | | | | | | | ... to BuildConfigurationFactory. It hasn't been an Interface for a while and the new name matches Run- and DeployConfigurationFactory Change-Id: I923c6a27e18a99628251b69e0270e910836e7b2a Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ProjectExplorer: Add history completion ability to SelectableFilesWidgetChristian Kandeler2019-01-221-0/+3
| | | | | | | | ... and make use of it in project contexts. Fixes: QTCREATORBUG-19781 Change-Id: I4618b6e4a64b1aaa1352afcc98e4cc6e5fac1859 Reviewed-by: hjk <hjk@qt.io>
* GenericProject: fix memory leakTim Jenssen2019-01-212-6/+11
| | | | | | | Change-Id: I5f5811229c6311fa19432a5018a1da33ead7894a Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* GenericProject: Support forwarding flags to clang code modelNikolai Kosjar2019-01-156-0/+79
| | | | | | | | | | | | | | | | ...in order to specify e.g. the language version to use. Create the additional files project.cxxflags and project.cflags. These are expected to contain command line flags for the clang code model on one single line. For example, "-std=c++11" can be provided to set the language version for parsing. Fixes: QTCREATORBUG-19668 Change-Id: I7712f546ba1fae536c32adfa5bd449c5b3484521 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* CppTools: Simplify ProjectUpdateInfoNikolai Kosjar2019-01-101-2/+1
| | | | | | | ...by using KitInfo. Change-Id: I17b4dd6c368ba8b10b765f12a4663c041c9be7e5 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* CppTools: De-duplicate code for CppProjectUpdaterNikolai Kosjar2019-01-101-23/+6
| | | | | | | Centralize gathering the kit, toolchains and qt version. Change-Id: I6bd586ac7925e2ee556fd119f1dab096cd500e41 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Remove unneeded invocations of CppProjectUpdater::cancel()Bernhard Beschow2019-01-061-2/+0
| | | | | | | | | The cancel methods were called just before setting up the parameters for the CppProjectUpdater::update() call, which calls cancel() as its very first action. Change-Id: I748cb4daa86bc8245cd906b2dff3c7b2d50795b2 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@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>
* GenericProject: Set deployment data, if availableChristian Kandeler2018-11-142-1/+37
| | | | | | | | | | We use the same approach as for CMake, namely the QtCreatorDeployment.txt file. Fixes: QTCREATORBUG-19202 Change-Id: I50605b8236b26f0c911e2448330019e94753af19 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: hjk <hjk@qt.io>
* GenericProjectManager: ModernizeAlessandro Portale2018-11-096-11/+9
| | | | | | | | | | modernize-use-auto modernize-use-equals-default modernize-use-nullptr modernize-use-override Change-Id: I67c9895f46efe8646176718949561240c7175c53 Reviewed-by: hjk <hjk@qt.io>
* Fix missing translation contextsEike Ziller2018-10-251-1/+1
| | | | | | | Change-Id: I4402157e7991ad0050333a34394b87ff3d6f4a1b Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Robert Loehning <robert.loehning@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
* Toolchains: Detect unspecified language versionNikolai Kosjar2018-10-081-4/+2
| | | | | | | | | | | | | | | | | | | | We checked the command line from the project manager for "-std=X" and friends to figure out the language version to use. However, if such a flag was not provided, we assumed the latest version we support. This could conflict with the actual version of the compiler and its predefined macros. Figure out the version by inspecting __cplusplus/__STDC_VERSION__ in the predefined macros of the toolchain. The MSVC compiler is an exception to this, as it does not seem to properly set the value - check for _MSVC_LANG if possible, otherwise simply assume some versions as before. While at it, add also support for C17/C18 and the upcoming C++2a. Task-number: QTCREATORBUG-20884 Task-number: QTCREATORBUG-21188 Change-Id: I464ffcd52d2120c0208275a050e82efda44fae1c Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>