Commit Graph

268 Commits

Author SHA1 Message Date
Eike Ziller
20f51bc642 Merge remote-tracking branch 'origin/4.13' into master
Conflicts:
	src/plugins/languageclient/languageclientcompletionassist.cpp

Change-Id: If12e1c532e5623ef063681309a918e7b51117b1c
2020-09-14 10:12:14 +02:00
Andy Shaw
e35af70d98 Android: Use c++_shared for STL as cxx_shared is not correct
This fixes a parsing problem from CMake as it will state:
"Invalid Android STL: cxx_shared." This amends
01b0d4f8f5

Change-Id: I315d36eac889ba53d76055814c6b43a453e1e2f7
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-09-11 07:34:11 +00:00
hjk
61bfd32438 ProjectExplorer: Introduce a ProjectConfiguration::kit() function
For convenience, and use it in some places.

Change-Id: I8f7cb502b37b2fbf4cf2d17cac9c6299558332dc
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-09-09 06:27:21 +00:00
Alessandro Portale
a650997448 QtSupport: Add supportsMultipleQtAbis getter
Introduce bool QtSupport::supportsMultipleQtAbis().

Let AndroidQtVersion respond according to the QVersionNumber.

This allows to replace the version arithmetics in several
places with straight forward (and better findable) function calls.

Task-number: QTCREATORBUG-24471
Change-Id: Ib6e39fd6485a54e08ad66f84d4e2582989043419
Reviewed-by: hjk <hjk@qt.io>
2020-09-07 07:10:26 +00:00
Alessandro Portale
2d61932387 CMakeProjectManager: Give InitialCMakeArguments a macroExpander icon
Change-Id: Ia1025f2fcecd018ff106fd6b8b9e1cc640af500e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-08-12 11:44:17 +00:00
Eike Ziller
3944162039 Merge remote-tracking branch 'origin/4.13' into master
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri
	src/plugins/cmakeprojectmanager/cmakebuildstep.cpp
	src/plugins/cmakeprojectmanager/cmakebuildstep.h
	tests/auto/debugger/tst_namedemangler.cpp
	tests/auto/qml/codemodel/check/tst_check.cpp

Change-Id: Iefd5f71c03c0078513b76a92af764a4fb22ee4c2
2020-08-10 15:56:54 +02:00
Alessandro Portale
7b6d44a90a Android: Introduce constants for Android ABIs
Avoiding string duplication prevents typo-related runtime errors and
allows an IDE to use find symbol rather than plain text search.

Change-Id: I7fba7c7c5cf90c0b371efce3b575537b2708dd0f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-07-26 05:49:49 +00:00
hjk
43b658e9e7 Utils: Drop Utils::SkipEmptyParts again
We require Qt 5.14 nowadays.

Change-Id: Iff245257d3cb19207007c0445ee13814e66152dd
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-07-21 12:42:27 +00:00
hjk
b60ab85c13 Android: Prevent crash in case there is no Qt version set
For CMake build.

Change-Id: I77946a5d7023a9cefc23baf243991949121e49ec
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-07-06 15:15:18 +00:00
hjk
e1c88116b3 Core/Utils: Migrate further to Utils::Id
The coreplugin/id.h header is kept for downstream for now.

Change-Id: I8c44590f7b988b3770ecdc177c40783e12353e66
(cherry picked from commit 430a33dcd9)
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-07-06 11:15:18 +00:00
Leena Miettinen
bced4a746c CMake: Fix UI text capitalization and punctuation
Change-Id: Id4adc0671357c646cbed5df3667addfc95130b73
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-07-02 11:20:05 +00:00
Christian Kandeler
a6098c6b2b CMake: Fix compiler warning about unused lambda capture
Change-Id: Ie95512a247997764d41ca5c5f8ba4cb576f634aa
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-06-26 11:08:32 +00:00
Eike Ziller
c0770313f3 CMake: Fix changing build directory
It wasn't possible to change the build directory if the old directory
didn't already contain a build.

Amends 7e6e02eb08

Change-Id: I741f6981273a4e04cceabde5b15b5ad951535ef8
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-06-25 13:07:22 +00:00
hjk
1c81a3b3e8 All: Use Utils::SkipEmptyParts
Task-number: QTCREATORBUG-24098
Change-Id: Iab45de9a9c17ddc39a0e343b1175d4f6cb94b098
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-06-17 05:55:25 +00:00
hjk
30610b7991 CMake: Remove some now-unused code
Change-Id: I39dd5f8de0ca4e5461cd01885029e1c65ac8ec05
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2020-06-10 07:50:01 +00:00
Christian Stenger
ae0d913e2f CMakePM: Fix compile
Amends 01b0d4f8f5.

Change-Id: I05a65684c51b960eeb4803b5d764bc8ff5a22626
Reviewed-by: hjk <hjk@qt.io>
2020-06-10 06:53:28 +00:00
Tobias Hunger
01b0d4f8f5 CMake: Remove magic configuration from CMake
Get rid of magic configuration handling in the CMakeProjectManager.

* Use CMakeCache.txt as the sole source of truth, do not keep
  a shadow copy of configuration in the .user file
* Have initial CMake arguments that are easy to edit in batch
  (Fixes: QTCREATORBUG-18179) used whenever no CMakeCache.txt
  file is in the build directory. These allow for any thing that
  can be passed to CMake on the command line.
  (Fixes: QTCREATORBUG-16296)
* Ask when changes to CMake configuration were not applied
  (Fixes: QTCREATORBUG-18504)
* Run cmake with arguments effecting its configuration only when
  the CMake settings are changed in the UI, run CMake without any
  special arguments in all other cases.
* Get rid of the confusing dialog used to keep settings in sync between
  what is in CMakeCache.txt and Creator (Fixes: QTCREATORBUG-23218)

Change-Id: I26d55be7df733f084f5691ecf7d7b4352f58b8e7
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-06-09 16:34:00 +00:00
Tobias Hunger
2fea24fe6a CMake: Support building several targets with cmake --build
CMake supports this for a while now.

As a side effect this fixes QTCREATORBUG-23738, which was caused by the
radio button hack used to show that only one item could be selected at
a time.

Change-Id: I18cbe6c5ee3872edaf74b9d828bde1ac5bf63563
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2020-06-03 08:04:50 +00:00
Tobias Hunger
7e6e02eb08 CMake: Warn on build directory changes
Change-Id: I78c5e850e268f4d7d66e40961bca85ef61be0483
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2020-04-30 13:10:15 +00:00
Tobias Hunger
59473389b9 CMake: Remove BuildDirManager
The BuildDirManager was used to switch between different
BuildDirReaders. Now that only the FileApiReader is left, that
infrastructure is no longer needed.

Change-Id: I2d339a3407bb633cff6a8f7502b7b09094f63fef
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-04-30 12:08:08 +00:00
Tobias Hunger
bf1bbbac05 CMake: Remove some unnecessary code
The build directory going to get set up either in
doInitialize or in fromMap, both using magic hidden in
BuildConfiguration itself.

Change-Id: I1aeb59f56d63f0affd50b45cc937e606af6da7b4
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2020-04-22 12:12:37 +00:00
Tobias Hunger
5bb5c7b904 CMake: Make sure a CMakeBuildConfiguration always has a CMakeBuildSystem
For this to work, we need to make sure no parsing is triggered before
the project is fully set up. Otherwise it would be QTCREATORBUG-23816
again...

Change-Id: If81f4c6b9c82283abdaa8a635f93ebe0bcaf8159
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-04-22 12:09:14 +00:00
Tobias Hunger
69b0a2cafc PathChooser: Allow for chooser-only selection of files/directories
Makes the line edit disabled and read-only in that case.
We also need to change the custom context menu from the line edit to the
path chooser itself, because disabled widgets do not show a context
menu, but we still want to see the select & copy, and the special
items for opening explorer or terminal.

Task-number: QTCREATORBUG-23798
Change-Id: Ib653b4eaaedfbe54c614377795ddc52d21ac12c0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2020-04-21 13:18:43 +00:00
Tobias Hunger
5350288e45 CMake: Fix includes all over the CMake plugin
Keep internals internal, remove some unnecessary includes, add
some that should have been there.

This reduces the number of files that get rebuild when working
on CMake internals from over 1000 to about 200.

This patch also moves some code around that ended up being
in the wrong file.

Change-Id: Icd7366ac760dc85031040720418fbb16336dce9b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-04-20 10:05:24 +00:00
Tobias Hunger
74a07f906f CMake: Rename some constants
Rename some constants to get a bit more consistency into the
naming scheme. I am so tiered of missing a constant due to it
not having _ in the expected places!

Change-Id: Ibb5e82ea4e25ccb559352839b96c8a64394f3085
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-04-17 13:24:43 +00:00
Eike Ziller
deb0eaf795 Merge remote-tracking branch 'origin/4.12'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri
	src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp

Change-Id: I34c3d1fd5be90537e37d15e00b1a0d455d1bf81d
2020-04-14 09:47:38 +02:00
Tobias Hunger
a53308cde6 CMake: Do not create .cmake directories in source dir
Only initialize the CMakeBuildSystem after the
CMakeBuildConfiguration has been fully set up. The "builddirectory"
was still pointing to the source directory, so creater configured
cmake in the source directory, leading to a useless directory being
left in the source tree that does not belong there.

Fixes: QTCREATORBUG-23816
Change-Id: I7c9b6ae1f8d999043e700cd9f2d56418c22f2abf
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-04-09 12:22:32 +00:00
Tobias Hunger
5de0e81d8b CMake: Fix typo in symbol names
I can't spell occurred:-/

Similar typos in 3rd party code (sqlite) has been left in place.

Change-Id: I7cfa9911fc434d42ce3df8e9c7ccb83dc00401e8
Reviewed-by: hjk <hjk@qt.io>
2020-03-19 17:50:21 +00:00
Eike Ziller
995ba78fae Merge remote-tracking branch 'origin/4.12'
Conflicts:
	src/plugins/cmakeprojectmanager/tealeafreader.cpp
	src/plugins/cmakeprojectmanager/tealeafreader.h
	src/plugins/projectexplorer/miniprojecttargetselector.cpp

Change-Id: I88d85be3903f57a55fddb7901e771a4822db1b85
2020-03-04 08:15:50 +01:00
hjk
7dd8858fa2 CMake: Remove unused CMakeBuildConfiguration::emitBuildTypeChanged()
Change-Id: I4cb93a7f89ff4bcada2083bebd8e9e96770f4818
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2020-03-02 11:12:11 +00:00
hjk
fbd1574a85 ProjectExplorer: Fix use of build step list preamble messages
The step list names are computed separately anyway, having an
extra preamble consisting of concatenated build list names on
one line looks unnecessary.

Change-Id: If754c6363042927210dfd09c23f2f494081f8c47
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-02-28 11:48:35 +00:00
hjk
3f68292dbe ProjectExplorer: Introduce ToolChainKitAspect::{c,cxx}ToolChain
Special accessors to the repeatedly used C and C++ cases to denoise
and slim down user code.  Plus some code cosmetics nearby.

Change-Id: Iba4662bd4731d8c4256e658529f39d5c995691ce
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-02-19 15:59:12 +00:00
Tobias Hunger
39cddf5d03 DebuggerAspect: Simplify handling of Qml debugging
There should not be a need to have the linkQmlDebuggingLibrary Q_PROPERTY
anymore. The property is added for the benefit of the DebuggerAspect, which
can just check relevant BuildConfigurationAspect directly.

Change-Id: Ic47ca9e26911e096564fe77bd14bebe959b4f116
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-02-19 12:58:40 +00:00
Tobias Hunger
a7bb870321 CMake: Remove disabledReason
The current implementation does not help the user and is not in sync with isEnabled(),
so it is not helpful to have.

Change-Id: Iddde1ac3da24d50e8a16d2bd4c6aa56eef34ef50
Reviewed-by: hjk <hjk@qt.io>
2020-02-11 15:58:06 +00:00
Christian Stenger
54cd881a40 CMakePM: Fix handling of qml debugging
Add a respective aspect to the build configuration
for handling qml debugging from the build side
similar to what we do with qmake and qbs.

Qml debugging needs to get enabled on the build side
before the settings on the run configuration page
has an effect.

Fixes: QTCREATORBUG-23541
Change-Id: I86267747601015760737d8b21978712896892a37
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-02-07 11:55:37 +00:00
Alessandro Portale
9904464074 Make various Q_LOGGING_CATEGORY's static
Change-Id: I43d3a198b0863d85a7fb305c7cb768f68acbd139
Reviewed-by: hjk <hjk@qt.io>
2020-01-15 14:54:10 +00:00
hjk
b4ee6eb3c0 ProjectExplorer: Move some of the BuildInfo setup code to central places
Change-Id: I8893366acb187ea1a94a8ca272ded2c46cb521d1
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-01-14 13:56:10 +00:00
hjk
1eaf44a270 ProjectExplorer: De-QObject-ify BuildConfigurationFactories
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>
2020-01-10 12:46:38 +00:00
hjk
a971da3bfe ProjectExplorer: Replace BuildConfigurationFactory::availableBuilds
... by a function object.

Change-Id: I9953ba6915c0177e7c4067d36dd755fc2ba5cf84
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-01-09 15:42:21 +00:00
hjk
571fb04d59 ProjectExplorer: Register some initial build steps by id
Helps to cut down BuildConfigration::setInitializer() usage.
Plan is to have more of that where feasible.

Change-Id: I138fcffc743daaf7068b5236c2a19c9ca0e3e2d4
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-01-07 11:51:13 +00:00
hjk
d1d9df60b6 CMake: Dissolve CMakeExtraBuildInfo
The information is effectively derivable from kit and build type, so
do it only when needed.

Change-Id: Ideb4e5106a6a0632ade98aad894d5b7aa6f83126
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-12-11 11:27:25 +00:00
hjk
b1a29dedfc ProjectExplorer: Pass parameters to BuildConfiguration initialization
... directly again, mostly undoing the temporary hack from fb631cb258.

Change-Id: I4485dcb23765d99b4b5869973f004457ebd7aa7d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-12-10 11:43:33 +00:00
hjk
2ab33d1dc9 CMake: Remove CMakeBuildConfiguration::project() overload
The base version is good enough nowadays.

Change-Id: I2e2ca690a29f9b877309ca98038d211d5c678fbd
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-12-10 11:27:55 +00:00
hjk
041a86c8c7 ProjectExplorer: Use function object for special build config init
Change-Id: I5da0f28ee1a64f8d9a3145f059019be702bee463
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-12-09 14:12:45 +00:00
Orgad Shaneh
49f6b0146a Merge remote-tracking branch 'origin/4.11'
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
2019-12-07 18:39:54 +02:00
hjk
3c41b91d44 ProjectExplorer: Settle on fixed set of build step lists
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>
2019-12-06 14:49:59 +00:00
BogDan Vatra
40a6bef7ed Android: Default to armv7 instead of arm64 (qmake & CMake)
Change-Id: I1c67a047784204a8a08c8a1ec4ec672532cbed11
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2019-12-02 12:01:20 +00:00
hjk
2758682723 ProjectExplorer: Move BuildSystem owership to BuildConfiguration
... 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>
2019-11-19 11:05:52 +00:00
Eike Ziller
bea3a8fa6f Merge remote-tracking branch 'origin/4.11'
Change-Id: I66389d88d5a60c6c86547b93cca945af42aa807b
2019-10-28 11:48:31 +01:00
BogDan Vatra
e3904f3b13 CMake: Add Android Multi ABI support
Change-Id: Ia5b3fcda29705fefca85833ebc28b4154defba5f
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2019-10-28 05:47:53 +00:00