Commit Graph

133 Commits

Author SHA1 Message Date
hjk
80a766a2cb Qmake: Move buildDir() from ProFileNode to QmakeBuildSystem
More a buildsystem than a node thing in general and removes
one use of activeBuildSystem and one use of the ProFileNode
-> ProFile back pointers.

Change-Id: Ie007fcd0db9e9294a08b3a1cd68f825c7d3dc9b8
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-03-23 07:42:15 +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
Eike Ziller
61dc14b67f Merge remote-tracking branch 'origin/4.12'
Change-Id: I3e7049da2c3da6f784e3cb3407c22ada556e5d24
2020-02-26 08:35:05 +01:00
Christian Kandeler
344a8f5622 Qmake: Do not list all the command-line arguments in the step summary
They will often not fit.

Change-Id: I749242a576e57dd1ffc721ca14b85d1e0fa1ac98
Reviewed-by: hjk <hjk@qt.io>
2020-02-20 15:12:48 +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
Christian Kandeler
eb0a9a2800 Qmake: Re-add accidentally deleted line
Amends e70116bf67.

Fixes: QTCREATORBUG-23514
Change-Id: Id852c591ae21d29312eb934f14970c6b05300bc9
Reviewed-by: hjk <hjk@qt.io>
2020-01-23 15:54:39 +00:00
hjk
c95bde6f6a ProjectExplorer: Pass Id to BuildStep constructor
Allows to use constants in fewer places, similar to what e.g.
RunConfiguration does.

Change-Id: I9d049128206c4acf0ce14b06b66d6c090a7c5242
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-01-09 11:26:01 +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
hjk
ce434ccb5d ProjectExplorer: Use full class for TriState value
Allows more compact code on the user side in most cases and
can hide the internal 'int-ness' from user code by wrapping
Variant conversions in the TriState class itself.

Change-Id: I4c91e0cd798ee988a0b9cb057749251a4efebaff
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-12-03 12:08:52 +00:00
Christian Kandeler
27a77f9b56 ProjectExplorer: Let user provide default build properties
Fixes: QTCREATORBUG-16458
Change-Id: I5f7a2450307a8d2e3392ca167411d1e00b58f05a
Reviewed-by: hjk <hjk@qt.io>
2019-12-02 13:42:20 +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
Christian Kandeler
e70116bf67 QmakeBuildConfiguration: Make use of Qt-related build aspects
Change-Id: Ia14bb468fe75403839d8dcc8022c4f233c363f62
Reviewed-by: hjk <hjk@qt.io>
2019-11-28 16:33:20 +00:00
Christian Kandeler
8a2fb30378 QmakeBuildConfiguration: Make use of SeparateDebugInfoAspect
Change-Id: I0dceadf2a6ef34187fa4107f3fc5d6831ecb7bfe
Reviewed-by: hjk <hjk@qt.io>
2019-11-28 14:48:36 +00:00
hjk
2059cb31f0 Qmake: Inline qmakestep.ui
In preparation of aspectification.

Change-Id: Ib60301db79f87f6e13f511a4bab57948ce46fce5
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-11-27 16:44:16 +00:00
hjk
5bac811432 Qmake: Move some non-configuration code from build config to build system
Change-Id: I6fdf20e740c2824cabb3659f36379f9325ab97bd
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-11-25 14:44:43 +00:00
Eike Ziller
4e6142c932 Merge remote-tracking branch 'origin/4.11'
Conflicts:
	src/plugins/autotest/testresultspane.cpp
	src/plugins/cmakeprojectmanager/cmaketool.cpp

Change-Id: Iade695ac9cab8bf3e3a1abd6e2c71f4a19132ac0
2019-11-21 22:18:35 +02:00
BogDan Vatra
7e8e6bcba1 Android/Qmake: Execute clean on architecture changes
Change-Id: Id0e1465e7ec7f6675cbf9d986352e811e6d31bec
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2019-11-21 13:42:22 +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
Orgad Shaneh
132abc789d ProjectExplorer: Apply low priority build immediately
The MakeSteps are instantiated when the project is opened, but if the low
priority setting is changed after that, it was not applied until reopening
the project, because the setting was only tested on the ctor.

Moved the setting test to actual execution.

Task-number: QTCREATORBUG-23048
Change-Id: Ie0bcbe07f6d9a09b173f7e0fa6f1d5d12b4ac601
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-10-10 08:07:44 +00:00
Orgad Shaneh
d26140e7f1 Qmake: Show real effective make call on Make step - take 2
Include custom Makefile.

Change-Id: Ibc6a341590f8b1ff0da2fa87f5e5bcd75182b6a7
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-10-08 08:33:25 +00:00
Orgad Shaneh
92c067ba36 ProjectExplorer: Add a setting for low build priority
Default is false.

Task-number: QTCREATORBUG-23048
Change-Id: I0f0cc787229456aad2ddf47e4ef37bad58af2038
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-10-08 08:19:16 +00:00
Orgad Shaneh
471e78a99c Qmake: Update effective qmake call on project parsing finished
If the project has MAKEFILE = Makefile.$$VAR it wasn't reflected when
VAR was set in Qmake arguments.

Change-Id: Ieb1cbfee9a0def89a5c9b6259e8acc87751b0f3a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-09-23 11:52:01 +00:00
Orgad Shaneh
e38361b5a8 Lower priority on build
This should prevent slowdown of the IDE (and the rest of the system) while
building with all the CPU cores.

Fixes: QTCREATORBUG-5155
Change-Id: Icaadc53958f2d8e918035463e3c9344c91235615
Reviewed-by: hjk <hjk@qt.io>
2019-09-18 09:35:39 +00:00
BogDan Vatra
6b31f9cf23 Android multi arch support
[ChangeLog][Android] Android multi arch support for qmake

Change-Id: Ib8b1874604a3392130c96fbc00b26713b3d788ae
Reviewed-by: hjk <hjk@qt.io>
2019-09-16 07:34:54 +00:00
hjk
9d206a2bc4 ProjectExplorer: Hide parts of BuildStep's QObject-ness from users
This lets the compiler catch issues like QTCREATORBUG-22818 and
saves visible casts on the user side.

Change-Id: I5a307a55364daa0bec039a4c38cc9827841ff9c1
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-08-20 10:35:57 +00:00
hjk
b9c10bb715 QMake: Re-export the qmake buildstep id constant
Will help with iOS later.

Change-Id: Id4d1899e117ae5aa05ed14a42bc80f474b9c659c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-08-09 11:08:17 +00:00
hjk
165f2f8938 Qmake: Replace QmakeBC::emitQmakeBuildConfigurationChanged
... by direct emission of the signal. Signals are public nowadays, so
the indirection is not needed anymore.

Change-Id: I82328a8fa05458e0478a52157863b7265f0a42ad
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-07-29 11:32:09 +00:00
hjk
3170601b4d ProjectExplorer: Prefer ProcessParameters::setCommandLine
... over setting command and args individually.

Change-Id: Iec7c8d3a0b05fb8fa0639f7ddbe7ccdc7387d2a2
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-06-24 13:47:05 +00:00
hjk
c7badbd701 Use more Utils::CommandLine in make steps
Change-Id: I72bbc65e0bec19a94418f1cb8bf9ba6fafbbe3bc
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-06-20 12:03:55 +00:00
Sergey Levin
30575d2c76 QMakeStep: Add extra parser arguments
It is useful when developing toolchain plugin to have separate agruments
for pro-file parser only.
Certain arguments may be added to qmake implicitly, without Qt Creator
control, and we would like to tell them to the parser in order to get
proper code assistance.
This function is used in 3rd party plugin Sailfish OS.

Change-Id: Ie1ce19d5773bb2c0c87b1d58cf00dca57f1108d5
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-06-14 07:37:26 +00:00
hjk
473a741c9f Utils: Rename FileName to FilePath
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>
2019-05-28 12:23:26 +00:00
hjk
93dfbad97b QmakeProject: Use QString mkspec in QmakeKitInformation
... and BaseQtVersion, and QmakeBuildConfiguration.

Change-Id: Iac5f768b80a7f8c2ea9a37d099b285d5793270db
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-28 11:16:57 +00:00
hjk
2b1c8aa877 ProjectExplorer: Introduce a alias for QList<Tasks>
Change-Id: I91391ad22b420926b0f512cac23cfe009048b218
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-28 05:51:40 +00:00
hjk
666953c393 Qmake: Use Utils::FileName in QMakeStep
Change-Id: I311947e476818ae7b14f299e0c917280f077165d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-16 10:52:23 +00:00
hjk
9433b8a7e7 ProjectExplorer: Use Utils::FileName in ProcessParameters
For the command and the working directory.

Change-Id: Ia69dc7100aeb57bb6e1b35f4dd4f3cf3763d8cda
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-15 12:55:22 +00:00
Orgad Shaneh
39ba01da71 Merge remote-tracking branch 'origin/4.9'
Change-Id: I7d1912cd5c4d824fd40d3454c5f1bb796f2c21d8
2019-04-07 23:13:17 +03:00
Eike Ziller
73da3d3bc0 Restore success states after failed build
Fix up of 966f4ea6a9

Fixes: QTCREATORBUG-22211
Change-Id: Ia5648c0cf06fb7a12ec34c9683607f7c221965c3
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-04-02 13:10:17 +00:00
Christian Kandeler
a8ebc37da2 Qmake: Allow users to force a qmake run on every build
Some people are fine with paying the extra cost for the somewhat lower
chance of an incremental build breakage.

Fixes: QTCREATORBUG-20888
Change-Id: I96409dfbbc7c747cb01dacbf1efc2b10ee38d07a
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-03-06 14:34:23 +00:00
hjk
6f37348b4c Replace static_casts by QOverload where possible
Mainly to get rid of the QProcess::finished deprecation warning.

Also adjust coding style in the surrounding connects when needed.

Change-Id: I12f9b248c7974b892c4a069356e578e80f8c59e9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-02-26 15:18:14 +00:00
hjk
c41ff1164b QtSupport: Remove BaseQtVersion::dumpUpdatedFor signal
Never emitted anymore.

Change-Id: I049e90dc77c70e57284ec967644a188735360310
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-02-14 13:10:02 +00:00
Christian Kandeler
ce19540b77 Move KitAspectWidget definitions alongside their KitAspects
A KitAspectWidget class is tightly coupled with the respective
KitAspect, and no one else ever needs to see any KitAspectWidget
subclass at build time.

Change-Id: I1883af3b054c225e1ff5dd913118715bfdbaacfc
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2019-02-11 14:39:29 +00:00
Christian Kandeler
83dd031960 ProjectExplorer: Rename KitInformation to KitAspect
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>
2019-02-11 11:55:01 +00:00
Christian Kandeler
966f4ea6a9 ProjectExplorer: Rework the build step run interface
Originally, the build manager used to run all build steps in a dedicated
thread. Communication between the step and the manager happened via a
QFutureInterface that was passed into the step's run() function.
Later, new steps were added that operated asynchronously, so the build
manager had to differentiate between the different kinds of steps for
starting and stopping.
These days, almost all build and deploy steps work asynchronously, which
made the QFuture-based interface look increasingly odd.
With this patch, all build steps are expected to work asynchronously, so
the build manager no longer needs to differentiate. Steps are started
and requested to stop via the run() and cancel() functions,
respectively, and emit the finished() signal when they are done. Build
step implementors no longer have to deal with a QFutureInterface. For
steps whose implementation is inherently synchronous, the BuildStep base
class offers a runInThread() function.

Change-Id: If905c68b234c5a669f6e19f43142eaa57d594803
Reviewed-by: hjk <hjk@qt.io>
2019-01-31 16:10:01 +00:00
Ivan Donchevskii
ce0b671d0a ProjectExplorer: Fix Clang toolchain setup on Windows
Clang toolchain in gcc mode requires mingw sysroot and target
in order to be used properly on Windows.
Requires Qt >= 5.12 to work properly (it has the required mkspec).

Change-Id: I4e5a734c699ac98740c0d50560aa7b69751ae58c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-01-21 11:51:30 +00:00
hjk
f007bc7593 ProjectExplorer: Simplify BuildStep::init() signature
The extra parameter was always computed but used only in one place,
and that use got removed lately.

Change-Id: Ie10c0107ca70ee97ce03f83294992aab8d1a3ffe
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-01-18 09:11:37 +00:00
Alessandro Portale
616e19ff9e Fix warning: "Missing emit keyword on signal call"
[-Wclazy-incorrect-emit]

Change-Id: I93bdc6e23cdaccf35c9899ae16870ccc65a54f80
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-01-17 15:54:56 +00:00
Orgad Shaneh
04ae0c8dfb ProjectExplorer: Pimpl AbstractProcessStep
Change-Id: I0f77ff2e88b29674c306b394093deb2060db70c8
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-11-19 10:02:46 +00:00
hjk
54efabd6e9 Qmake: Move some data accessors from QmakeProFile to QmakeProFileNode
These are not used during parsing but when operating on the items
in the project tree.

This loosens the ties between the qmake related parser and project
nodes.

Change-Id: I077356fcde240df56b466c71c902c821c4885f6d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-11-14 10:04:25 +00:00
hjk
0f5d5dbfe4 ProjectExplorer: Make BuildStep::immutable use a data member
Default to false, remove all no-op reimplementations.

And rename the getter to isImmutable according to the rules.

Change-Id: I8cce79d88fb59badfa1cffcf30a46f7ff3b09e8b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-10-23 14:12:39 +00:00