Commit Graph

111 Commits

Author SHA1 Message Date
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
hjk
d6c605d84c ProjectExplorer: Change BuildStepConfigWidget::summaryWidget()
From a virtual function to a normal one backed by a real data member.

That's essentially what several re-implementations did, the other
ones used a fixed value instead.

Change-Id: I61e45f1d4f7f0f80fe2eb1f2729785f37e7bb803
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-10-17 06:14:55 +00:00
hjk
ded488819a ProjectExplorer: Remove BuildStepListWidget::additionalSummaryText()
... and related code.

The base implementation returns an empty string, the only re-implemented
version in the qmake step returned a member that has been empty since
243145621 "Profile introduction" in 2012.

Change-Id: Ifafdc1b88bf4a96cdca5b48d9ccf47b63d9d987a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-10-16 11:20:32 +00:00
hjk
683e7aa6cf ProjectExplorer: Make BuildStepConfigWidget::displayName a value
Use BuildStep::displayName() as default.

This probably could be the only possibility, but currently there
are some discrepancies that are kept in this patch to make
the patch mechanical.

Change-Id: I2a1e5c2ff37ad95e25309eb16e07099e42191f60
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-10-15 12:08:22 +00:00
hjk
cbb98bedcf ProjectExplorer: Merge SimpleBuildStepWidget into BuildStepWidget
The extra m_step member is not worth the abstraction, especially
since almost all non-SimpleBuildStepWidget have something similar,
too. Also, as several derived classes needed to correct
SimpleBuildStepWidget's setShowWidget(false).

Change-Id: I6e80d8c84c363b90dc27c70abd7fa6cefa1ed91e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-10-12 16:01:46 +00:00
Tobias Hunger
48450e6a4d Qmake: Run make qmake_all in the directory that qmake ran in
Call make qmake_all in the same directory that qmake was run in.

This fixes long build times when doing builds of individual targets.
Qmake is run in a child folder there, but make qmake_all used to be
run in the top-level source directory instead.

Task-number: QTCREATORBUG-20823
Change-Id: I42e77738b0a92469efb97720cabea26484fb4852
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-07-24 09:07:46 +00:00
Alessandro Portale
cd5066d86b QmakeProjectManager: Modernize
modernize-use-auto
modernize-use-nullptr
modernize-use-override
modernize-use-using
modernize-use-equals-default

Change-Id: I7642992eee6838bb2566921de87390c1771ebcbe
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-07-13 09:25:21 +00:00
hjk
f44e73b858 ProjectExplorer: Simplify BuildStepFactory
De-QObject-ify class, tr contexts are now the product's
context, which was the case in some BuildStepFactories already,
and is current state in {Run,DeployConfiguration}Factory.
One spurious object name removed.

De-virtualize canHandle(), it was never overloaded and is not
intended to be overloaded anymore.

Remove unused clone() function.

Change-Id: Iff7fba5f707505f868f94458084a18650535fa23
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-05-31 10:15:42 +00:00
Eike Ziller
c8c6b28e22 Merge remote-tracking branch 'origin/4.7'
Conflicts:
	src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.h

Change-Id: I192b9e88f967182f3275b4b98abed1220c26daac
2018-05-28 16:10:23 +02:00
Orgad Shaneh
c0b8ac7966 QmakePM: Expand qmake arguments for summary, effective call and parser
For example, if you set MAKEFILE=Makefile.%{CurrentBuild:Name}, the
effective qmake call should show Makefile.foo and so should the command-
line summary (with details collapsed).

Change-Id: Ide0c0b0758b92f77f7cc97dd538db818575c91dd
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-05-22 11:16:06 +00:00
Eike Ziller
a2fe4087ff Rename files for QmakeMakeStep
Change-Id: Iff0f3f08fff7a5e25ed309891e54d3c02dbb8713
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-05-18 08:48:15 +00:00
hjk
fd3a75d7f2 QmakeProject: Show full qmake path for Effective qmake command
This is for information only anyway, and leaving out the path makes
it less useful for e.g. cut&paste to a terminal or to double-check
whether the intended qmake binary is used.

Change-Id: Id35ee37363f58377a9da2e18c3ec6d89caf54312
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2018-05-03 08:57:15 +00:00
hjk
2d108079bd QmakeProjectManager: Remove unused QMakeStep::forced() accessor
The m_forced state is completely handled in the step's implementation,
nobody accesses it.

Change-Id: I05e15a53b08462e9c82d3f498e26aea0303a4ecf
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-01-05 16:52:53 +00:00
Nikita Baryshnikov
aa7995bae1 Qmake: Fix dialog title when separateDebugInfo is changed
Change-Id: Iadfa3e74794b7a4a17b77b1b212894a4b2830c7d
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-12-12 08:30:40 +00:00
hjk
53a151074a ProjectExplorer/all: Re-organize BuildSteps/{Deploy,Build}Config setup
This follow the rough pattern of recent *RunConfigurationFactory changes
for build and deploy configurations.

- Collapse the two lines of constructors similar to what
  890c1906e6 did for RunConfigurations
  * Deploy* was purely mechanical
  * Build* ctors are split in connects() in the ctor body
    to create "empty shell for clone" etc
    and build step additions in initialize() functions which
    are only used in the create() case.
  -- Allows to collapse the shared 'ctor()' functions, too.

- Move FooBuildConfigurationFactory::create() implementations
  to FooBuildConfiguration() constructor. That was a strange
  and unneeded ping-pong between factories and objects, and
  furthermore allows one level less of indirection (and for a
  later, left out here, some reduction of the
  FooBuildConfiguration interfaces that were only used to
  accommodate the *Factory::create() functions.

- Most {Build,Deploy}Configuration{,Factory} classes had a canHandle(),
  but there wasn't one in the base classses. Have one there.

- Most canHandle() functions were checking simple restrictions on
  e.g. project or target types, specify those by setters in the
  constructors instead and check them in the base canHandle()

- clone() is generally replaced by a creation of a "shell object"
  and a fromMap(source->toMap()), implemented in the base, there
  are two cases left for Android and Qbs that needed(?) some extra
  polish

- generally use canHandle() in base implementation, instead
  of doing that in all Derived::canFoo()

- as a result, canCreate/create/canClone/clone reimplementations
  are not needed anymore, keep the base implementation for
  now (could be inlined into their only users later), but
  de-virtualize them.

- Combine Ios{Preset,DSym}BuildStepFactory. There was only one
  'dsym' build step they could create.

- Split the 'mangled' id into the ProjectConfiguration subtype
  specific constant identifier, and a QString extraId() bit.
  Only maintain the mangled id in saved settings.

- Make ProjectConfiguration::m_id a constant member, adapt
  all constructors of derived classe.

Not done in this patch:

- Finish possible cosmetic changes on top

- Add a way to specify restrictions to supported Qt versions
  (used in Android/Ios), as the base implementation does not
  depend on the qtsupport plugin

- Combine the QList<X> availableFoo() + createFoo(X) function
  pairs to somthing like a direct
   QList<struct { X; std::function<X()>; }> fooCreators()
  to avoid e.g. the baseId.withSuffix() <-> id.suffixAfter(base)
  pingpong

- Remove the *Factories from the global object pool

- Do something about priority(). Falling back to plain
  qmake in android+qmake setup is not helpful.

Change-Id: I2be7d88d554c5aa8b7db8edf5b93278e1ae0112a
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-12-08 11:17:55 +00:00
Tobias Hunger
b8e348c4af BuildStep: Do not use QLatin1String/QLatin1Char in BuildSteps
Change-Id: I287831a9151ba867eec443206235c7e07a6176e8
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-07-25 14:29:26 +00:00
Orgad Shaneh
b57553b7a2 QmakePM: Fix redundant execution of qmake on build file
... when Makefile is customized.

The resolved makefile was <directory>Makefile.custom instead of
<directory>/Makefile.custom.

Change-Id: I01c4ef8b6d4ba64fc6663219c2eab7a39e03888b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-06-19 08:07:08 +00:00
Orgad Shaneh
d3e4ef5868 QMakePM: Fix crash when running qmake before the project is parsed
Disable the build actions properly.

Change-Id: Id4e2906b1891fcb3387e23cb0e0a8c1f119d2426
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-05-29 10:38:16 +00:00
Orgad Shaneh
74e570a858 Qmake: Add variable choosers where variables are parsed
Change-Id: I6203ebadbc934a7ae80ae1c5ca3cfad2471b787e
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-03-29 08:00:12 +00:00
Orgad Shaneh
98f76ff26f Qmake: Expand variables in the arguments preview
Change-Id: I422417fbbfa86c39c8a79a593cedd87b208735f4
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-03-20 10:21:01 +00:00
Vikas Pachdha
7136162047 add extra arguments for qmake
unlike user arguments, extra arguments are not user editable

Change-Id: I0413c2da699c6d2fce1db10a8bc3dd938c8477b0
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-03-14 15:51:31 +00:00
Tim Jenssen
2631ffabd5 Remove spaces in initializer lists
Format initializer lists code style like.

Change-Id: Ib82c235e4ba7dc75ee96a7abc0c47eff7b0a9013
Reviewed-by: hjk <hjk@qt.io>
2017-02-22 16:25:09 +00:00
Tobias Hunger
f9eab73dad qmake: move over from QmakeProjectNodes to QmakeParserNodes
Change-Id: Iab87e0c248b0f651a1774336c3bddf83baa9d057
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-02-22 16:00:49 +00:00